SA-MP Forums Archive
Dialog List - 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: Dialog List (/showthread.php?tid=413625)



Dialog List - RenovanZ - 06.02.2013

Removed


Re: Dialog List - LarzI - 06.02.2013

You are using strcat correclty, so I can't seem to understand why it crashes. You could, however, use a ternary operator instead (https://sampforum.blast.hk/showthread.php?tid=216730) along with format

pawn Код:
format( string, sizeof( string ), "%sSniper\t\t\t{00FF00}%s", string, (( PlayerInfo[playerid][pSchemGun][12] == 1 ) ? ("Buyed") : ("$30000")) );



Re: Dialog List - macparas - 06.02.2013

Can some help to build my own RP server .. I can pay well .. just PM ...


Re: Dialog List - RenovanZ - 06.02.2013

Quote:
Originally Posted by LarzI
Посмотреть сообщение
You are using strcat correclty, so I can't seem to understand why it crashes. You could, however, use a ternary operator instead (https://sampforum.blast.hk/showthread.php?tid=216730)

pawn Код:
format( string, sizeof( string ), "%sSniper\t\t\t{00FF00}%s", string, (( PlayerInfo[playerid][pSchemGun][12] == 1 ) ? ("Buyed") : ("$30000")) );
WOW! You are my life saver! and what '?' stand for ?
And Can I make multiple format with 1 variable (string) ?


Re: Dialog List - LarzI - 06.02.2013

Read the link I gave you about the ternary operator! Yes you can. You just add "%s" at the beginning and put the string as the first format, just like I've did.


Re: Dialog List - RenovanZ - 06.02.2013

Quote:
Originally Posted by LarzI
Посмотреть сообщение
Read the link I gave you about the ternary operator! Yes you can. You just add "%s" at the beginning and put the string as the first format, just like I've did.
Okay thanks, +Rep for you