Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [HELP] Help with a dialog

 
  • 0 Vote(s) - 0 Average
Pawn [HELP] Help with a dialog
Mathex
Offline

Burgershot Member
Posts: 1
Threads: 1
Joined: Feb 2021
Reputation: 0
#1
2021-02-02, 01:55 AM
I tell you, I am creating a function that changes the colors in the band or faction that you are leading, but when I select the color the color is not applied to the band
*[font="Google Sans", arial, sans-serif]this is in a, "ShowDialog (playerid, dialogid)"*[/font]

Code:
case CREW_MODIFY_COLOR:return ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Selecciona el nuevo color", DIALOG_CREATE_CREW_COLOR_String, "Cambiar", "Volver");

*[font="Google Sans", arial, sans-serif]and this is in, "public OnDialogResponse (playerid, dialogid, response, listitem, const inputtext [])"*[/font]
[font="Google Sans", arial, sans-serif]
Code:
case CREW_MODIFY_COLOR:[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]{[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]    if(!response) return ShowDialog(playerid, CONFIG_BANDA);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]    if(PLAYER_INFO[playerid][pFaccion] == 0) return SendClientMessage(playerid, -1,"No perteneces a una banda.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]    if(PLAYER_INFO[playerid][pFaccion] == 1) return SendClientMessage(playerid, -1,"No puedes modificar el color de esta banda.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if(PLAYER_INFO[playerid][pRango] != 8) return SendClientMessage(playerid, -1, "No tienes permiso.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if(BandasInfo[ PLAYER_INFO[playerid][pFaccion] ][B_Atacando]) return SendClientMessage(playerid, -1, "No se puede cambiar el color cuando la banda está en combate.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]            for(new id = 0; id < MAX_BANDAS; id++)[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]{[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if(BandasInfo[id][BColor] == RandomColors[listitem])[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]{[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]    SendClientMessage(playerid, -1, "Color en uso, selecciona otro color.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]return ShowDialog(playerid, CREW_MODIFY_COLOR);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]}[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]}[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]            BandasInfo[PLAYER_INFO[playerid][pFaccion]][BColor] = RandomColors[listitem];[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]new r, g, b, a, new_territory_color;[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]HexToRGBA(BandasInfo[PLAYER_INFO[playerid][pFaccion]][BColor], r, g, b, a);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]new_territory_color = RGBAToHex(r, g, b, 135);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]for(new i = 0; i != MAX_T; i ++)[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]{[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if(!TERRITORIOS_INFO[i][Territorio_Valido]) continue;[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if(!TERRITORIOS_INFO[i][Territorio_Usado]) continue;[/font][/size][/color][/font][/size][/color]

[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]if((TERRITORIOS_INFO[i][Territorio_Banda] == BandasInfo[PLAYER_INFO[playerid][pFaccion]][bID]) || (TERRITORIOS_INFO[i][Territorio_BandaID] == BandasInfo[PLAYER_INFO[playerid][pFaccion]][bID]))[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]{[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]TERRITORIOS_INFO[i][Territorio_Color] = new_territory_color;[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]UpdateGangZoneColor(i);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]}[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]}[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]SendClientMessage(playerid,-1,"El color de tu banda fue cambiado correctamente.");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]new DB_Query[256];[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]mysql_format(handle_db, DB_Query,sizeof(DB_Query), "UPDATE `facciones` SET `Color` = '%d' WHERE `id`='%d';", BandasInfo[PLAYER_INFO[playerid][pFaccion]][BColor], BandasInfo[PLAYER_INFO[playerid][pFaccion]][bID]);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]mysql_query(handle_db, DB_Query, false);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]mysql_format(handle_db, DB_Query, sizeof(DB_Query), "UPDATE `territorios` SET `Color`='%d' WHERE `Banda`='%d'", new_territory_color, PLAYER_INFO[playerid][pFaccion]);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]mysql_query(handle_db, DB_Query, false);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]print("actualiza3");[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]ShowDialog(playerid, CONFIG_BANDA);[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]return 1;[/font][/size][/color][/font][/size][/color]
[color=#202124][size=x-large][font="Google Sans", arial, sans-serif][color=#202124][size=x-large][font="Google Sans", arial, sans-serif]}
[/font]



[font="Google Sans", arial, sans-serif][font="Google Sans", arial, sans-serif]And inside the game this happens:[/font][/font]
[font="Google Sans", arial, sans-serif][font="Google Sans", arial, sans-serif][font="Proxima Nova Regular", "Helvetica Neue", Helvetica, Arial, sans-serif][Image: Ks8Oly0.png][/font][/font][/font]


[font="Google Sans", arial, sans-serif]I select the color and nothing happens[/font]

[Image: hYXTrHy.png]

[font="Google Sans", arial, sans-serif]And the console does not show errors[/font]


[Image: Eb9JdNV.png]
Jarnokai
Offline

Burgershot Member
Posts: 53
Threads: 5
Joined: Apr 2019
Reputation: 0
Location: Oulu, Finland
#2
2021-02-02, 04:04 PM
Please stop messing around with the fonts on every forum post - I see it all the time and never understood what draws people to put more focus on what fonts they use instead of what they write. Worst of all, the formatting seems to be broken and the post is now practically unreadable.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode