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



Hm? - Eminem 2ka9 - 19.03.2013

When i put the below formats together, only one format appears, why is this?



This is what i have.
pawn Код:
format(string, sizeof(string), "[CAPTURE] {15FF00}%s{FF0000} has been taken over!", ZoneName(checkpointid));
format(string, sizeof(string), "You get {FFFF00}+3 score, +20 armor and $2500{FFFFFF} for capturing zone {15FF00}%s!", ZoneName(checkpointid));



Re: Hm? - [ABK]Antonio - 19.03.2013

That's because you're just re-formatting the string.


Re: Hm? - Eminem 2ka9 - 19.03.2013

So, which way should put put it? I don't know how to add two.


Re: Hm? - kamzaf - 19.03.2013

Your just formatting one string with some text and reformatting the same one with another variable.

If you want to use the same string but send the message to the player then u would do:

pawn Код:
format(string, sizeof(string), "[CAPTURE] {15FF00}%s{FF0000} has been taken over!", ZoneName(checkpointid));
SendClientMessageToAll(green ,string);
format(string, sizeof(string), "You get {FFFF00}+3 score, +20 armor and $2500{FFFFFF} for capturing zone {15FF00}%s!", ZoneName(checkpointid));
SendClientMessage(playerid, green ,string);



Re: Hm? - Eminem 2ka9 - 19.03.2013

Worked! Thanks=]