rendered paste body if(strcmp(command, "/teleport", true) == 0)
{
new player[256];
player = strtok(command, index);
if(!strlen(player))
{
SendClientMessage(playerid,0xAA3333AA, "Usage: /teleport <Player ID>");
return 1;
}
if(!IsNumeric(player))
{
SendClientMessage(playerid,0xAA3333AA, "Must be a player's ID!");
return 1;
}
if((strlen(player) > 100) || (strlen(player) < 0))
{
SendClientMessage(playerid,0xAA3333AA, "Invalid Player ID");
return 1;
}
if(!IsPlayerConnected(strlen(player)))
{
SendClientMessage(playerid,0xAA3333AA, "Player is not connected");
return 1;
}
new Float:X, Float:Y, Float:Z;
GetPlayerPos(strlen(player), Float:X, Float:Y, Float:Z);
SetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
SendClientMessage(playerid,0x299637C8, "You are teleport");
return 1;
}