24.08.2013, 22:10
anyone have a player to player teleport?
somthing like /tp %usernamehere%
and it will take you too them
(admin only)
somthing like /tp %usernamehere%
and it will take you too them
(admin only)
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;
}
CMD:tp(playerid, params[])
{
new id, Float:pos[3];
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid, COLOR_LIGHTRED, "You are not an 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]);
SetPlayerInterior(playerid, GetPlayerInterior(id));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerPos(playerid, pos[0], pos[1], pos[2]);
SendClientMessage(playerid, COLOR_YELLOW, "Successfully teleported to your target");
return 1;
}