28.02.2011, 20:11
help please, when i do /goto <id>, i teleported to ls
pawn Код:
dcmd_GOTO(playerid,params[])
{
new id, n[MAX_PLAYER_NAME],on[MAX_PLAYER_NAME];
new tmp[256], Index;
tmp = strtok(params,Index), id = strval(tmp);
GetPlayerName(id,on,sizeof(on));
GetPlayerName(playerid,n,sizeof(n));
if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,ORANGE,"You need to be level 1 to use this command!");
if(!strlen(params)) return SendClientMessage(playerid,RED,"USAGE: /goto <ID> ");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,RED,"Invalid ID");
SendClientMessage(id,ORANGE, "An Admin has teleported to you.");
SetPlayerPos(playerid,id,id,id);
return 1;
}