CMD:aduty(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if (!AdminDuty[playerid])
{
PlayerInfo[playerid][pAdminDuty] = 1;
SendClientMessageEx(playerid, COLOR_GRAD2, "You are now Off-Duty.");
}
else
{
PlayerInfo[playerid][pAdminDuty] = 0;
SendClientMessageEx(playerid, COLOR_GRAD2, "You are now On-Duty.");
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
}
return 1;
}
What kind of errors? is the compiler giving you errors? warnings? Is it crashing the server?
|
CMD:aduty(playerid, params[]) { if(Adminlevelofplayer[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command."); if(PlayerInfo[playerid][pAdmin] >= 2) { if (!AdminDuty[playerid]) { PlayerInfo[playerid][pAdminDuty] = 1; SendClientMessageEx(playerid, COLOR_GRAD2, "You are now Off-Duty."); } else { PlayerInfo[playerid][pAdminDuty] = 0; SendClientMessageEx(playerid, COLOR_GRAD2, "You are now On-Duty."); { } return 1; }
if its not an missed bracket above, try this
Код:
CMD:aduty(playerid, params[]) { if(Adminlevelofplayer[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command."); if(PlayerInfo[playerid][pAdmin] >= 2) { if (!AdminDuty[playerid]) { PlayerInfo[playerid][pAdminDuty] = 1; SendClientMessageEx(playerid, COLOR_GRAD2, "You are now Off-Duty."); } else { PlayerInfo[playerid][pAdminDuty] = 0; SendClientMessageEx(playerid, COLOR_GRAD2, "You are now On-Duty."); { } return 1; } |
What is if(Adminlevelofplayer[playerid] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command.");
|
Adminlevelofplayer[playerid]