SA-MP Forums Archive
admin color help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: admin color help (/showthread.php?tid=490653)



admin color help - Balla - 27.01.2014

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:

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;
}



Re: admin color help - TonyII - 27.01.2014

SetPlayerColor to white when you demote him, or show us the demote cmd