13.12.2015, 10:09
i have this Without error but not works in zadmin.can you help me?
Код:
dcmd_onduty(playerid,params[]) #pragma unused params { if(GetPVarInt(playerid,"onduty")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already on duty!"); { if(Account[playerid][pAdminlevel]< 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You do not have permission to use this command!"); { if(Account[playerid][pAdminlevel]== 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need admin level 2 for use this command!"); { if(Account[playerid][pAdminlevel]>= 2) { 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); } } } } return 1; } dcmd_offduty(playerid,params[]) #pragma unused params { if(GetPVarInt(playerid,"offduty")) return SendClientMessage(playerid,COLOR_RED,"ERROR: You have already off duty!"); { if(Account[playerid][pAdminlevel]< 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You do not have permission to use this command!"); if(Account[playerid][pAdminlevel]== 1) return SendClientMessage(playerid,COLOR_RED,"ERROR: You need admin level 2 for use this command!"); if(Account[playerid][pAdminlevel]>= 2) { 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; }