25.05.2013, 04:32
Hello, When I type /goto command, I'm getting teleported to ID 0 everytime, even I type /goto [another player id]. Here's the code for /goto command.
Код HTML:
CMD:goto(playerid,params[])
{
if(pInfo[playerid][pAdminLevel] >= 2)
{
new targetid;
if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /goto [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
new Float:x,Float:y,Float:z,inter;
GetPlayerPos(targetid,Float:x,Float:y,Float:z);
inter = GetPlayerInterior(targetid);
SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,inter,0);
}
else {
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
}
return 1;
}


