SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Español/Spanish

 
 
Thread Tools Display Modes
Old 06/11/2016, 11:55 PM   #1
Ciprian0
Little Clucker
 
Ciprian0's Avatar
 
Join Date: Nov 2014
Location: Venezuela - Ciudad Guayana
Posts: 20
Reputation: 5
Default Algun ProgressBar recomendable?

Quisiera saber algun progressbar decente, que funcione al 100%, he usado unos y no sirven, he perdido tiempo con ello
__________________
Ciprian0 is offline  
Old 07/11/2016, 12:42 AM   #2
OTACON
Godfather
 
OTACON's Avatar
 
Join Date: Dec 2010
Location: mongolia
Posts: 5,169
Reputation: 568
Default Respuesta: Algun ProgressBar recomendable?

a que te refieres con progressbar , sistema o editor?
__________________
GAMEROL.NET --> youtube
Siempre un paso por delante de SA-MP!.
Always one step ahead of SA-MP !.


FORUM: www.gamerol.net -In maintenance-
IP SAMP: server.gamerol.net -In maintenance-
IP TEAMSPEAK: ts.gamerol.net -on-line-

_____________________
OTACON is offline  
Old 07/11/2016, 01:31 AM   #3
Gles
Big Clucker
 
Gles's Avatar
 
Join Date: Aug 2016
Location: Cargando...
Posts: 168
Reputation: 13
Default Respuesta: Algun ProgressBar recomendable?

Corrección.
Este es un sistema de orina simple, si deseas tener alguna imagen en especial, avísame.

Code:
#include <a_samp>
#include <orina>

//Tiempo que tarda en sumar 1 a GanasDeMear
#define Tiempo             20000 // ahora está en 5 seg :v yo diria ponerle como 20 (20000)

//COLORES
#define VERDE             0x00D000FF
#define ROJO             0xE10000FF
#define NARANJA         0xFEAA00FF

//ANIMACION
#define MEAR_ANIMACION 68

//TImers
new ActualizarBarra[MAX_PLAYERS];
new TiempoMeando[MAX_PLAYERS];
//Barra
new Bar:MearBarra;
//Variables
new GanasDeMear[MAX_PLAYERS];

//Forwards de Timers
forward Menos(playerid);
forward DespuesDeMear(playerid);

//ProxDetector
#define T                 0x00FF07FF
#define T2                0x00FF07FF
#define T3                0x00FF07FF
#define T4                0x00FF07FF
#define T5                0x00FF07FF

new Escuchar[MAX_PLAYERS];

forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);

public OnFilterScriptInit()
{
    MearBarra = CreateProgressBar(548.000000, 35.000000, 57.500000, 5.199999, -51901185, 100);
    return 1;
}

public OnPlayerSpawn(playerid)
{
    GanasDeMear[playerid] = 0;
    SetProgressBarValue(MearBarra, 0);
    ActualizarBarra[playerid] = SetTimer("Menos",Tiempo,1);
    ShowProgressBarForPlayer(playerid, MearBarra);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/orinar", cmdtext, true) == 0)
    {
        if(GanasDeMear[playerid] < 25)
        {
            SendClientMessage(playerid, ROJO, "Todavia no tienes tantas ganas de mear");
        }
        else
        {
        GanasDeMear[playerid] = 0;
        SetProgressBarValue(MearBarra, 0);
        TiempoMeando[playerid] = SetTimer("DespuesDeMear",3000,false);
        SetPlayerSpecialAction(playerid, MEAR_ANIMACION);
        SendClientMessage(playerid, VERDE, "[Pensamiento] ¡Uuff!, ");
        new string[256], nombre[256];
        GetPlayerName(playerid, nombre, sizeof(nombre));
        format(string, sizeof(string), "** PSSSSSSSSSSSSSSS(%s [ID:%d])",nombre, playerid);
        ProxDetector(10.0, playerid, string,T,T2,T3,T4,T5);
        }
        return 1;
    }
    return 0;
}

public Menos(playerid)
{
GanasDeMear[playerid] += 1;
new Float:probando = GetProgressBarValue(MearBarra);
SetProgressBarValue(MearBarra, probando+1.0);
UpdateProgressBar(MearBarra, playerid);
if(GanasDeMear[playerid] == 50)
{
    SendClientMessage(playerid, NARANJA, "Tienes ganas de mear, ves a un lavabo o mea detras de un arbol");
}
else if(GanasDeMear[playerid] == 75)
{
    SendClientMessage(playerid, NARANJA, "¡Corre, mea donde puedas! Si no meas te vas a mear encima!");
}
else if(GanasDeMear[playerid] == 100)
{
    TogglePlayerControllable(playerid,0);
    SetPlayerSpecialAction(playerid, MEAR_ANIMACION);
    TiempoMeando[playerid] = SetTimer("DespuesDeMear",3000,false);
    SendClientMessage(playerid, ROJO, "¡Te has meado encima! Se van a reír de ti");
}
return 1;
}

public DespuesDeMear(playerid)
{
    GanasDeMear[playerid] = 0;
    SetProgressBarValue(MearBarra, 0);
    ActualizarBarra[playerid] = SetTimer("Menos",Tiempo,1);
    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
    TogglePlayerControllable(playerid,1);
    return 1;
}

public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
   if(IsPlayerConnected(playerid))
   {
      new Float:posx, Float:posy, Float:posz;
      new Float:oldposx, Float:oldposy, Float:oldposz;
      new Float:tempposx, Float:tempposy, Float:tempposz;
      GetPlayerPos(playerid, oldposx, oldposy, oldposz);
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
         if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
         {
            if(!Escuchar[i])
            {
               GetPlayerPos(i, posx, posy, posz);
               tempposx = (oldposx -posx);
               tempposy = (oldposy -posy);
               tempposz = (oldposz -posz);
               if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
               {
                  SendClientMessage(i, col1, string);
               }
               else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
               {
                  SendClientMessage(i, col2, string);
               }
               else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
               {
                  SendClientMessage(i, col3, string);
               }
               else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
               {
                  SendClientMessage(i, col4, string);
               }
               else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
               {
                  SendClientMessage(i, col5, string);
               }
            }
            else
            {
               SendClientMessage(i, col1, string);
            }
         }
      }
   }
   return 1;
}
espero te sirva, saludos.
__________________
"- Nadie es mejor que nadie, todos somos iguales aunque uno sepa mas que otro."

Last edited by Gles; 07/11/2016 at 02:12 AM.
Gles is offline  
Old 07/11/2016, 01:43 AM   #4
OTACON
Godfather
 
OTACON's Avatar
 
Join Date: Dec 2010
Location: mongolia
Posts: 5,169
Reputation: 568
Default Respuesta: Algun ProgressBar recomendable?

Quote:
Originally Posted by Gles View Post
Llégate al privado, tengo uno.

http://forum.sa-mp.com/showthread.php?t=114080
__________________
GAMEROL.NET --> youtube
Siempre un paso por delante de SA-MP!.
Always one step ahead of SA-MP !.


FORUM: www.gamerol.net -In maintenance-
IP SAMP: server.gamerol.net -In maintenance-
IP TEAMSPEAK: ts.gamerol.net -on-line-

_____________________
OTACON is offline  
Old 07/11/2016, 05:59 PM   #5
SilverGamingYT
Banned
 
Join Date: Aug 2016
Posts: 28
Reputation: 0
Default Re: Algun ProgressBar recomendable?

Gles mira el error que me tira, porfavor pasame el include

Code:
C:\Users\JONATAN\Desktop\diego\LatinGames RP 2.0\filterscripts\orina.pwn(2) : fatal error 100: cannot read from file: "orina"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
SilverGamingYT is offline  
Old 08/11/2016, 07:15 PM   #6
Gles
Big Clucker
 
Gles's Avatar
 
Join Date: Aug 2016
Location: Cargando...
Posts: 168
Reputation: 13
Default Respuesta: Re: Algun ProgressBar recomendable?

Quote:
Originally Posted by SilverGamingYT View Post
Gles mira el error que me tira, porfavor pasame el include

Code:
C:\Users\JONATAN\Desktop\diego\LatinGames RP 2.0\filterscripts\orina.pwn(2) : fatal error 100: cannot read from file: "orina"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Cambia el nombre del Include a Progress y ya está.
__________________
"- Nadie es mejor que nadie, todos somos iguales aunque uno sepa mas que otro."
Gles is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 07:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.