How Can i change the Color
#1

How can i change the color on text in login/register?
PHP код:
ShowMainMenuDialog(playeridframe)
{
    new 
titlestring[64];
    new 
string[256];
    switch(
frame)
    {
        case 
1:
        {
            new 
ip[32];
            
GetPlayerIp(playeridip32);
            
format(titlestringsizeof(titlestring), "Login - %s"GetPlayerNameEx(playerid));
            
format(stringsizeof(string), "Welcome to The Social World Roleplay, %s.\n\nIP Address: *<*<*<*<*<*<*<\n\nThe name that you are using is registered, please enter a password to login:"GetPlayerNameEx(playerid),  ip);
            
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
        }
        case 
2:
        {
            new 
ip[32];
            
GetPlayerIp(playeridip32);
            
format(titlestringsizeof(titlestring), "Register - %s"GetPlayerNameEx(playerid));
            
format(stringsizeof(string), "Welcome to The Social World RP, %s.\n\nIP Address: %s\n\nYou may register an account by entering a desired password here:"GetPlayerNameEx(playerid),  ip);
            
ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_INPUT,titlestring,string,"Register","Exit");
        }
        case 
3:
        {
            new 
ip[32];
            
GetPlayerIp(playeridip32);
            
format(titlestringsizeof(titlestring), "Login - %s"GetPlayerNameEx(playerid));
            
format(stringsizeof(string), "Invalid Password!\n\nWelcome to TSW-RP, %s.\n\nIP Address: %s\n\nThe name that you are using is registered, please enter a password to login:"GetPlayerNameEx(playerid),  ip);
            
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_INPUT,titlestring,string,"Login","Exit");
        }
    }
}
public 
SafeLogin(playerid)
{
    
// Main Menu Features.
    
ShowMainMenuGUI(playerid);
    
SetPlayerJoinCamera(playerid);
    
ClearChatbox(playerid);
    
SetPlayerVirtualWorld(playerid0);
    new 
playername[MAX_PLAYER_NAME];
    
GetPlayerName(playeridplayernamesizeof(playername));
    if(
doesAccountExist(playername))
    {
        
gPlayerAccount[playerid] = 1;
        
ShowMainMenuDialog(playerid1);
        return 
1;
    }
    else
    {
        if( 
strfindplayername"_"true) == -)
        {
            
SendClientMessageExplayeridCOLOR_WHITE"Connection rejected. Please get a name in the correct format: Firstname_Lastname." );
        }
        else
        {
            
gPlayerAccount[playerid] = 0;
            
ShowMainMenuDialog(playerid2);
        }
        return 
1;
    }

Reply
#2

you can change color very easy just enter it like
pawn Код:
scm(playerid,COLOR_WHITE,"( ! ) Welcome to {FF9900}M{FFFFFF}y {FF9900}S{FFFFFF}erver{AA3333}RPG {FFFFFF}( v. 1.0 )");
scm its short of sendclientmessage also in string same can change color
Reply
#3

{FFFFF}Whatever{FFF0F}Blablabla

Put the color code within { and } but exclude 0x
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)