How to change Dialog color - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to change Dialog color (
/showthread.php?tid=360589)
How to change Dialog color -
jeremy8810 - 18.07.2012
Hey guys,
I just want to give my dialog some color, especialy the title, I want to make it blue:
0x0A82FA
What I want to change:
http://i47.tinypic.com/wsl0jk.png
My code:
pawn Код:
// This command teleports you to your selected house
COMMAND:gohome(playerid, params[])
{
// Setup local variables
new HouseList[1000];
// Send the command to all admins so they can see it
SendAdminText(playerid, "/gohome", params);
// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
// Check if the player has a wanted level of less than 3
if (GetPlayerWantedLevel(playerid) < 3)
{
// Check if the player is not jailed
if (APlayerData[playerid][PlayerJailed] == 0)
{
// Check if the player is not inside a vehicle
if (GetPlayerVehicleID(playerid) == 0)
{
// Ask to which house the player wants to add his vehicle
for (new i; i < MAX_HOUSESPERPLAYER; i++)
{
// Check if this houseindex is occupied
if (APlayerData[playerid][Houses][i] != 0)
format(HouseList, 1000, "%s{00FF00}%s{FFFFFF}\n", HouseList, AHouseData[APlayerData[playerid][Houses][i]][HouseName]);
else
format(HouseList, 1000, "%s{FFFFFF}%s{FFFFFF}\n", HouseList, "Empty house-slot");
}
ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Select", "Cancel");
}
else
SendClientMessage(playerid, 0xFF0000FF, "You need to be on-foot to port to your house");
}
else
SendClientMessage(playerid, 0xFF0000FF, "You cannot use /gohome when you're in jail");
}
else
SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}You cannot use /gohome when you're wanted");
}
else
return 0;
// Let the server know that this was a valid command
return 1;
}
What do I have to change at this line:
pawn Код:
ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "Choose the house to go to:", HouseList, "Select", "Cancel");
Re: How to change Dialog color -
Andi_Evandy - 18.07.2012
Just embed it to your script, so it will be like this:
pawn Код:
ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{0A82FA}Choose the house to go to:", HouseList, "Select", "Cancel")
Re: How to change Dialog color -
Dan. - 18.07.2012
Try this:
pawn Код:
ShowPlayerDialog(playerid, DialogGoHome, DIALOG_STYLE_LIST, "{0A82FA}Choose the house to go to:", HouseList, "Select", "Cancel");
E:// Too late..
Re: How to change Dialog color -
jeremy8810 - 18.07.2012
aah now I know what I did wrong, thanks guys!