Posts: 12
Threads: 3
Joined: Jun 2013
Reputation:
0
how can i make when i click on button [Tab] so it shows me a menu of all player and if i cllick on some player its teleports me to him
Please help me!
[cmd only for admins level 5]
Posts: 772
Threads: 79
Joined: Dec 2012
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
new targetid;
if(targetid != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
SetPlayerPos(playerid, x, y, z);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(targetid));
SetPlayerInterior(playerid, GetPlayerInterior(targetid));
}
else return SendClientMessage(playerid, 0xFFAA00, "ERROR: invalid playerid");
}
return 1;
}