All pastes #503177 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-22 19:30 UTC
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;
}