Dialog List
#1

Removed
Reply
#2

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")) );
Reply
#3

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

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) ?
Reply
#5

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.
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)