Help me with setting Colours - 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: Help me with setting Colours (
/showthread.php?tid=651585)
Help me with setting Colours -
Bonch - 23.03.2018
Hello guyz i am setting colors to my menu. So the problem is i want thext " | Vip: "- be white and "%s" - bee as they are Bronze, Silver, Gold but in this IMG you can see i have some problems. Can you help me?
https://i.imgur.com/dWPbb3U.jpg
stock ShowMainMenu(playerid)
{
new st[60];
new viptext[20];
switch(GetPVarInt(playerid, "VipLevel"))
{
case 0: viptext = "None";
case 1: viptext = "{cd7f32}Bronze";
case 2: viptext = "{c0c0c0}Silver";
case 3: viptext = "{ffd700}Gold";
}
format(st, sizeof(st), RGB_WHITE"Level:"RGB_SERVER" %d"RGB_WHITE" | Exp: "RGB_SERVER"%d"RGB_WHITE" | Vip:"" %s", GetPVarInt(playerid, "Level"), GetPVarInt(playerid, "Respect"), viptext);
return ShowPlayerDialog(playerid, 195, DIALOG_STYLE_LIST, st, "1) Statistica\n2) Options\n3) Usafrtxoeba\n4) Administracia\n5) Daxmareba\n6) Name change\n7) Forum-ze registracia\n

Migwevebi\n9) Davalebebi\n10) Donate", "Next","Cancel");
}
Re: Help me with setting Colours -
ForCop - 23.03.2018
Quote:
Originally Posted by Bonch
Hello guyz i am setting colors to my menu. So the problem is i want thext " | Vip: "- be white and "%s" - bee as they are Bronze, Silver, Gold but in this IMG you can see i have some problems. Can you help me?
https://i.imgur.com/dWPbb3U.jpg
stock ShowMainMenu(playerid)
{
new st[60];
new viptext[20];
switch(GetPVarInt(playerid, "VipLevel"))
{
case 0: viptext = "None";
case 1: viptext = "{cd7f32}Bronze";
case 2: viptext = "{c0c0c0}Silver";
case 3: viptext = "{ffd700}Gold";
}
format(st, sizeof(st), RGB_WHITE"Level:"RGB_SERVER" %d"RGB_WHITE" | Exp: "RGB_SERVER"%d"RGB_WHITE" | Vip:"" %s", GetPVarInt(playerid, "Level"), GetPVarInt(playerid, "Respect"), viptext);
return ShowPlayerDialog(playerid, 195, DIALOG_STYLE_LIST, st, "1) Statistica\n2) Options\n3) Usafrtxoeba\n4) Administracia\n5) Daxmareba\n6) Name change\n7) Forum-ze registracia\n  Migwevebi\n9) Davalebebi\n10) Donate", "Next","Cancel");
}
|
Код:
stock ShowMainMenu(playerid){
new st[90];
switch(GetPVarInt(playerid, "VipLevel")){
case 1: st = "{cd7f32}Bronze";
case 2: st = "{c0c0c0}Silver";
case 3: st = "{ffd700}Gold";
default: st = "None";
}
format(st, sizeof(st),RGB_WHITE"Level:"RGB_SERVER" %d"RGB_WHITE" | Exp: "RGB_SERVER"%d"RGB_WHITE" | Vip: %s", GetPVarInt(playerid, "Level"), GetPVarInt(playerid, "Respect"), st);
return ShowPlayerDialog(playerid, 195, DIALOG_STYLE_LIST, st, "1) Statistica\n2) Options\n3) Usafrtxoeba\n4) Administracia\n5) Daxmareba\n6) Name change\n7) Forum-ze registracia\n Migwevebi\n9) Davalebebi\n10) Donate", "Next","Cancel");
}
Re: Help me with setting Colours -
AlexMSK - 23.03.2018
Will fix it.
edit:
Tested it.
https://i.imgur.com/mYoOeiz.jpg