09.03.2011, 20:00
tente:
pawn Code:
//no topo do gm:
//no topo do gm:
new chamoufunc = 0;
forward GetPlayerNumber(numero[]);
//No onplayercomandText
if(strcmp(cmd, "/nome", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "USE: /nome [telefone]");
return 1;
}
chamoufunc = playerid;
GetPlayerNumber(strval(x_nr));
}
return 1;
}
//no final do gm
public GetPlayerNumber(numero[])
{
for(new i = 0; i <= MAX_PLAYERS; ++i)
{
if(numero == PlayerInfo[i][numero])
{
new tnome[MAX_PLAYER_NAME];
GetPlayerName(i, tnome, sizeof(tnome) );
//aqui vocк poe suas funзхes...
}
}
return 1; //ID Invбlido
}