08.11.2010, 13:10
Your problem is that you use GetPlayerName on ID before you find out what ID is.
That means when you use "GetPlayerName(ID,aName,sizeof(aName));" ID is still new, uninitialised, aka 0.
So the name will always be the name of player 0.
That means when you use "GetPlayerName(ID,aName,sizeof(aName));" ID is still new, uninitialised, aka 0.
So the name will always be the name of player 0.
pawn Код:
dcmd_wank(playerid,params[])
{
new ID; <-- ID is empty which means 0
...
GetPlayerName(ID,aName,sizeof(aName)); <-- ID is still 0
...
if(sscanf(params,"u",ID)) <-- This is where you find out what ID is
{
...
}
...
return 1;
}

