27.01.2014, 14:47
Hi all, I've created a command for admins, so if they type ingame /admincolor they have an admin nickname color. But when I demote an admin to level 0 as normal player, he have still the admin color. So the admincolor won't remove, how to fix that?
this is the admincolor script:
this is the admincolor script:
pawn Код:
CMD:admincolor(playerid, params[])
{
if(PlayerAcc[playerid][Log] == 1)
PlayerAcc[playerid][UseColor] = 1;
PlayerAcc[playerid][SaveColor] = COLOR_ADMIN;
SetPlayerColor(playerid, PlayerAcc[playerid][SaveColor]);
if(PlayerAcc[playerid][Log] == 0) return SendClientMessage(playerid, COLOR_RED, "** You are not logged in, please login first.");
if(PlayerAcc[playerid][Admin] == 0) return SendClientMessage(playerid, -1,""orange"** Sorry, admins level 3+ can use that command!");
if(PlayerAcc[playerid][Admin] >= 3)
{
{
SetPlayerColor(playerid, COLOR_ADMIN);
SendClientMessage(playerid, COLOR_YELLOW, "** You have succesfully changed your nickname color in the admin color.");
}
}
else return ErrorMessages(playerid, 7);
return 1;
}