12.06.2014, 14:37
pawn Код:
CMD:get(playerid, params[])
{
if(!PlayerInfo[playerid][pAdmin]) return NOACCESS;
new id;
if(sscanf(params, "u", id)) return SendClientMessage(playerid, COLOR_RED, "{00FFFF}*{EEEEEE}Usage: /gethere [Playername/ID]");
if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
new string[75], name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerInterior(id, GetPlayerInterior(playerid));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "{00FFFF}*{EEEEEE}Administrator %s has teleported you to him", name);
SendClientMessage(id, COLOR_WHITE, string);
format(string, sizeof(string), "{00FFFF}*{EEEEEE}You have teleported %s to you", PlayerName);
SendClientMessage(playerid, COLOR_WHITE, string);
SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid));
SetPlayerPos(id, x + 2, y, z);
return 1;
}