28.10.2011, 21:01
hi im having problem with Sscanf
i have this
the problem is when theres 5 players on server then lets say i type [/gotop 4] and it will teleport me to player 0
how to fix this ?
i have this
pawn Код:
COMMAND:gotop(playerid, params[])
{
new gotopid;if(sscanf(params,"u", gotopid)) return SendClientMessage(playerid,0xFF0000FF,"Usage: "GREEN"/gotop [id]");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(gotopid,X,Y,Z);
SetPlayerPos(playerid, X+1, Y+1, Z);
return 1;
]
how to fix this ?