24.08.2013, 22:14
In ZCMD:
pawn Код:
CMD:tp(playerid, params[])
{
new id, Float:pos[3];
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not a rcon admin");
if(sscanf(params, "u", id))
return SendClientMessage(playerid, COLOR_LIGHTRED, "USAGE: /tp [playerid/PON]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, COLOR_LIGHTRED, "Playerid is an invalid playerid");
GetPlayerPos(id, pos[0], pos[1], pos[2]);
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_YELLOW, "Successfully teleported to your target");
return 1;
}