12.06.2014, 14:21
Код:
CMD:get(playerid, params[]) { new id; if(PlayerInfo[playerid][pAdmin] >= 1) { if(sscanf(params, "i", id)) { SendClientMessage(playerid, COLOR_RED, "{00FFFF}*{EEEEEE}Usage:gethere[Playername/ID]"); return 1; } else { if(IsPlayerConnected(id)) { new string[256]; new name[MAX_PLAYER_NAME+1], PlayerName[MAX_PLAYER_NAME+1]; new 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); } else { SendClientMessage(playerid, COLOR_RED, "Inactive"); return 1; } } } else { SendClientMessage(playerid, COLOR_RED, "You are not an Admin"); return 1; } return 1; }