13.12.2015, 10:45
i change it to this:
but now one problem!!i want if player on duty and type in chat = [Admin] name: id text.
Код:
CMD:onduty(playerid,params[]) { if(GetPVarInt(playerid,"onduty")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already on duty!"); { if(Account[playerid][pAdminlevel]< CmdsOptions[onduty]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You do not have permission to use this command!"); { oldcolor[ playerid ] = GetPlayerColor( playerid ); oldskin[ playerid ] = GetPlayerSkin( playerid ); ResetPlayerWeapons(playerid); SendClientMessage(playerid,COLOR_RED,"Your duty now on!"); SetPVarInt(playerid,"onduty",true); SetPlayerSkin(playerid,217); SetPlayerColor(playerid,0xEC0EECFF); GivePlayerWeapon(playerid,38,9999); SetPlayerHealth(playerid,99999); DeletePVar(playerid,"offduty"); } } return 1; } CMD:offduty(playerid,params[]) { if(GetPVarInt(playerid,"offduty")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already off duty!"); { if(Account[playerid][pAdminlevel]< CmdsOptions[offduty]) return SendClientMessage(playerid,COLOR_RED,"ERROR: You do not have permission to use this command!"); { SetPlayerSkin(playerid,oldskin[playerid]); SetPlayerColor(playerid,oldcolor[playerid]); ResetPlayerWeapons(playerid); SendClientMessage(playerid,COLOR_RED,"Your duty now off!"); SetPVarInt(playerid,"offduty",true); SetPlayerHealth(playerid,100); } } return 1; }