pawn Код:
COMMAND:tele(playerid, params[])
{
new Player1, Player2, Float:x, Float:y, Float:z, IntID, WorldID, Name[24];
if (sscanf(params, "uu", Player1, Player2)) SendClientMessage(playerid, 0xFF0000AA, "[Usage]: /tele <PlayerToPort> <TargetPlayer>");
else
{
if (IsPlayerConnected(Player1))
{
if (IsPlayerConnected(Player2))
{
GetPlayerName(Player2, Name, sizeof(Name));
GetPlayerPos(Player2, x, y, z);
IntID = GetPlayerInterior(Player2);
WorldID = GetPlayerVirtualWorld(Player2);
SetPlayerVirtualWorld(Player1, WorldID);
SetPlayerInterior(Player1, IntID);
SetPlayerPos(Player1, x, y, z + 3.0);
}
else
SendClientMessage(playerid, 0xFF0000FF, "Player2 isn't online");
}
else
SendClientMessage(playerid, 0xFF0000FF, "Player1 isn't online");
}
return 1;
}