Teleport to player.
#1

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;
}
Reply


Messages In This Thread
Teleport to player. - by DerickClark - 21.08.2015, 23:03
Re: Teleport to player. - by jamal1992 - 21.08.2015, 23:07
Re: Teleport to player. - by jlalt - 21.08.2015, 23:09
Re: Teleport to player. - by DerickClark - 21.08.2015, 23:09

Forum Jump:


Users browsing this thread: 1 Guest(s)