[Ayuda] Como Realizar Esto... -
OTACON - 24.03.2012
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.
Respuesta: [Ayuda] Como Realizar Esto... -
Lunnatiicz - 24.03.2012
Osease checar si tiene la variable por ej: en 1 y un con un cmd buscar /quientienelavar y salga -Pepito? xd
Respuesta: [Ayuda] Como Realizar Esto... -
OTACON - 24.03.2012
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
Respuesta: [Ayuda] Como Realizar Esto... -
Lunnatiicz - 24.03.2012
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?
Respuesta: [Ayuda] Como Realizar Esto... -
OTACON - 24.03.2012
Quote:
Originally Posted by Lunnatiicz
Testeabas tu solo?
|
Si, pero Con Doble cuenta
Respuesta: [Ayuda] Como Realizar Esto... -
LuisGraph - 24.03.2012
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
Respuesta: [Ayuda] Como Realizar Esto... -
OTACON - 24.03.2012
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.