Jump to content
  • 0

pomoc String V Dialogu


djejsy

Dotaz

Cavko potreboval by som poradit ako dat do dialogu viac stringov, pretoze jeden tam dat viem ale ako je to s viacerimi?

 

Chcel by som to takto:

 

SetPlayerHealth(playerid,dUserINT(PlayerName(playerid)).("Zdravie"));
GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("Peniaze")-GetPlayerMoney(playerid));
format(string,string2, sizeof(string),"Informácie o účte:\nZdravie:%d HP\nPeniaze:%d €\n",GetPlayerHealth(playerid),GetPlayerMoney(playerid));
ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Vítaj späť",string,string2,"OK","OK");

 

ale to pise mischmatch a nesuhlasi pocet argumentov a neviem prist nato ako by sa to dalo.

 

Skuste niekto poradit.

Dakujem.

 

// Edit:

Vyriesene pomocou strcat.

 

LOCK

Link to comment
Share on other sites

3 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Administrátor

protoze tam pripisujes hovadiny

 

format(string,string2, sizeof(string),

 

,"Vítaj späť",string,string2,

Link to comment
Share on other sites

  • 0

Nie :d


new STRING[300], string1[150], string2[150];
new Float:hp; GetPlayerHealth(playerid,hp);
format(string1, 150, "Peniaze: %d\n\n", GetPlayerMoney(playerid));
format(string2, 150, "Zdravie: %f\n\n", hp);
strcat(STRING, string1);
strcat(STRING, string2);

 

Ale chyba je ze to nechce vypisat ten string 2 vzy tam je 0.0000 :d

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...