31.12.2009, 17:30
pawn Код:
dcmd_goto(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
if (sscanf(params,"u",id))
{
SendClientMessage(playerid,COLOR,"[USAGE] /goto [ID]");
}
else if(!IsPlayerConnected(id))
{
SendClientMessage(playerid,COLOR,"[ERROR] Player is not connected");
}
else if(playerid == id) {
SendClientMessage(playerid,COLOR,"[ERROR] You can't teleport yourself.");
}
else
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(id,X,Y,Z);
SetPlayerPos(playerid,X,Y,Z);
}
}
else
{
SendClientMessage(playerid,COLOR,"[ERROR] You are not logged in at rcon.");
}
return 1;
}