31.10.2018, 17:14
Quote:
|
I am okay and I am not using it (okay before I did) (can you compile that code and tell me if you get any errors/warnings please? The author says he gets 2 warnings, I don't.
|
Code:
CMD:aduty(playerid, params[])
{
new id;
if(IsAdmin(playerid))
{
if(IsOnAdminDuty(playerid))
{
PlayerInfo[playerid][pAdminDuty] = 0;
SendClientMessage(playerid, COLOR_YELLOW, "You are now off duty.");
DestroyDynamic3DTextLabel(PlayerAdminLabel[playerid]);
}
else
{
PlayerAdminLabel[playerid] = CreateDynamic3DTextLabel(ReturnAdminLevel(playerid), 0xFFA500FF, 0.0, 0.0, 0.1, 5.0, .attachedplayer = playerid, .testlos = 1);
SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on duty as a %s", ReturnAdminLevel(id));
PlayerInfo[playerid][pAdminDuty] = 1;
}
}
else
return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
return 1;
}


