[Ayuda] Como Realizar Esto...
#1

Buenas a Todos, Queria Saber Como puedo hacer esto, detectar si tal user tiene una variable y llevarla a un format,
osea Crear un comando con el format y la funcion que detectara la variable, ejemplo:

la Variable la tiene Pepito, y viene Pepa y coloca el comando y le saldra el mensaje [La Variable la tiene El user: Pepito]

Bueno, ojala me entiendan y puedan ayudarme :S.

Desde ya muchas gracias.

PD: No Molesten a Pepa y Pepito xDDDDD.
Reply
#2

Osease checar si tiene la variable por ej: en 1 y un con un cmd buscar /quientienelavar y salga -Pepito? xd
Reply
#3

Quote:
Originally Posted by Lunnatiicz
Посмотреть сообщение
Osease checar si tiene la variable por ej: en 1 y un con un cmd buscar /quientienelavar y salga -Pepito? xd
Exacto, pero lo ke no me sake es lo de chekear al user si tiene la variable, intente con for(new i; i < GetMaxPlayers(); i++) pero solo me decteta ami solo :S
Reply
#4

Quote:
Originally Posted by bytytus
Посмотреть сообщение
Exacto, pero lo ke no me sake es lo de chekear al user si tiene la variable, intente con for(new i; i < GetMaxPlayers(); i++) pero solo me decteta ami solo :S
Testeabas tu solo?
Reply
#5

Quote:
Originally Posted by Lunnatiicz
Посмотреть сообщение
Testeabas tu solo?
Si, pero Con Doble cuenta
Reply
#6

pawn Код:
new Var[MAX_PLAYERS] = -1;

for(new i; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
         if(Var[i])
         {
             new name[24]; new str[50];
             GetPlayerName(i, name, 24);
             format(str, 50, "%s tiene la variable", name);
         }
     }
////////////////////////COMANDO/////////////////////////////
if(strcmp(cmd, "/givecash", true) == 0)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
    Var[giveplayerid] = 0;
    return 1;
}
Usa un timer para llamar el bucle
Reply
#7

Quote:
Originally Posted by LuisGraph
Посмотреть сообщение
pawn Код:
new Var[MAX_PLAYERS] = -1;

for(new i; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
         if(Var[i])
         {
             new name[24]; new str[50];
             GetPlayerName(i, name, 24);
             format(str, 50, "%s tiene la variable", name);
         }
     }
////////////////////////COMANDO/////////////////////////////
if(strcmp(cmd, "/givecash", true) == 0)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    giveplayerid = strval(tmp);
    Var[giveplayerid] = 0;
    return 1;
}
Usa un timer para llamar el bucle
Asi es como tengo xD, pero no me funciona, pero capas es por ke no tengo el GetPlayerName hay lo tengo con un stock.

ahora Probare con el GetPlayerName dentro de la funcion.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)