How would i do this
#1

How would i make it so when i do a command like /adminduty my name would change and the colour of it would change


Please Help Please
Reply
#2

SetPlayerName(playerid,
SetPlayerColor(playerid,
Reply
#3

pawn Код:
new
    bool:IsOnAdminDuty [ MAX_PLAYERS ] = false;


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/adminduty", cmdtext, true, 10) == 0)
    {
        if( IsPlayerAdmin( playerid ) ) //Replace this with your admin variable (PlayerInfo [ playerid ] [ pAdmin])?
        {
            if( IsOnAdminDuty [ playerid ] == false )
            {
                IsOnAdminDuty [ playerid ] = true;
                SetPlayerColor( playerid, 0xFF0000FF ); //Replace this with the administrator colour.
            }
            else
            {
                IsOnAdminDuty [ playerid ] = false;
                SetPlayerColor( playerid, 0xFFFFFFFF ); //Reset them to their normal colour!
            }
        }
        else return SendClientMessage( playerid, -1, "[ERROR] You're not an Administrator!" );
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)