21.08.2015, 23:03
This command don't teleport to the player location.
Код:
CMD:tpto(playerid, params[])
{
new id = isnull(params);
if(isnull(params)) return SendClientMessage(playerid, COLOUR_WHITE, "Usage: /tpto [playerid]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOUR_WHITE, "Player is not connected");
else
{
new Float:X, Float:Y, Float:Z, Pname[24];
GetPlayerPos(id, X, Y, Z);
GetPlayerName(id, Pname, 24);
SetPlayerPos(playerid, X, Y, Z);
new String[56];
format(String, sizeof(String), "%s teleported to you", Pname, id);
SendClientMessage(id, COLOUR_WHITE, String);
}
return 1;
}

