Red Admin Name
#1

How to make a admin names red. through a toggle like /togredname
Reply
#2

Something like that :

pawn Код:
if(strcmp("/togredname",cmdtext,true))
{
      if(IsPlayerAdmin(playerid))
      {
          SetPlayerColor(playerid, COLOR_RED);
      }
      return 1;
}
Reply
#3

pawn Код:
new PreviousColor[MAX_PLAYERS];
CMD:togredname(playerid, params[])
{
    #define Msg SendClientMessage
    if (!IsPlayerAdmin(playerid))
    {
        return
            Msg(playerid, 0xFF0011FF, "This command is only for admins");
    }
    if (GetPVarInt(playerid, "RedNameOn") == 1)
    {
        PreviousColor[playerid] = GetPlayerColor(playerid);
        SetPlayerColor(playerid, 0xFF0000FF);
        SetPVarInt(playerid, "RedNameOn", 1);
        Msg(playerid, 0xFF0011FF, "Red name enabled");
    }
    else
    {
        SetPlayerColor(playerid, PreviousColor[playerid]);
        SetPVarInt(playerid, "RedNameOn", 0);
        Msg(playerid, 0xFF0011FF, "Red name enabled");
    }
    #undef Msg
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)