How Can i change the Color
#1

How can i change the color of "Welcome to The Social World Roleplay"

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

Reply
#2

You would use Hexadecimal colors wrap them in { } and add them in the ShowPlayerDialog

Example
pawn Код:
public OnPlayerLogin(playerid)
{
    new westring[124];
    if(fexist(UserPath(playerid)))
    {
        format(westring,sizeof(westring),"{FDC502}Welcome back, {FFFFFF}%s",GetName(playerid));
        INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,westring,"Type your password\r\n below to login.","Login","Quit");
    }
    else
    {
        format(westring,sizeof(westring),"{FDC502}Welcome, {FFFFFF}%s",GetName(playerid));
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,westring,"Type your password below\r\n to register an account.","Register","Quit");
    }
}
Reply
#3

Like This?

format(string, sizeof(string), "{COLOR_RED}Welcome{FFFFFF} 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);
Reply
#4

Unless
pawn Код:
#define COLOR_RED           {FF0000}
is at the top of your script, then no. The color inside { } cannot be the Pawn Hexadecimal ( 0xFFFFFF )

Go to this site, choose your color, copy the code after the '#' sign and put that between the brackets. Only hex colors are allowed in those brackets.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)