18.03.2012, 12:06
Код:
CMD:jail(playerid,params[]) { if(PInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) { new id; new jailedname[MAX_PLAYER_NAME]; new adminname[MAX_PLAYER_NAME]; if(sscanf(params,"u",id))return SendClientMessage(playerid,red,"Useage: /jail <playerid>"); if(IsPlayerConnected(id)) { GetPlayerName(id,jailedname,sizeof(jailedname)); GetPlayerName(playerid,adminname,sizeof(adminname)); new string[256]; format(string,sizeof(string),"Administrator \"%s\" Has Jailed You",adminname); SendClientMessage(id,blue,string); format(string,sizeof(string),"You Have Jailed \"%s\"",jailedname); SendClientMessage(playerid,blue,string); SetPlayerPos(id, 264.5442199707,77.155387878418,1001.0390625); return SetPlayerInterior(id, 6); } else return SendClientMessage(playerid,red,"ERROR: Player Is Not connected"); } else return SendClientMessage(playerid,red,"ERROR: You are not a admin to use this command"); } CMD:unjail(playerid,params[]) { if(PInfo[playerid][Level] >= 3 || IsPlayerAdmin(playerid)) { new id; new unjailedname[MAX_PLAYER_NAME]; new adminname[MAX_PLAYER_NAME]; if(sscanf(params,"u",id))return SendClientMessage(playerid,red,"Useage: /unjail <playerid>"); if(IsPlayerConnected(id)) { GetPlayerName(id,jailedname,sizeof(jailedname)); GetPlayerName(playerid,adminname,sizeof(adminname)); new string[256]; format(string,sizeof(string),"Administrator \"%s\" Has UnJailed You",adminname); SendClientMessage(id,blue,string); format(string,sizeof(string),"You Have Jailed \"%s\"",unjailedname); SendClientMessage(playerid,blue,string); return SpawnPlayer(id); } else return SendClientMessage(playerid,red,"ERROR: Player Is Not connected"); } else return SendClientMessage(playerid,red,"ERROR: You are not a admin to use this command"); }