How Can i change the Color -
thesocialworld - 17.03.2012
How can i change the color of "Welcome to The Social World Roleplay"
PHP код:
ShowMainMenuDialog(playerid, frame)
{
new titlestring[64];
new string[256];
switch(frame)
{
case 1:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(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(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Register - %s", GetPlayerNameEx(playerid));
format(string, sizeof(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(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(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");
}
}
}
Re: How Can i change the Color -
ReneG - 17.03.2012
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");
}
}
Re: How Can i change the Color -
thesocialworld - 17.03.2012
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);
Re: How Can i change the Color -
ReneG - 17.03.2012
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.