SA-MP Forums Archive
[SOLVED] Trying to make " % " sign in a ClientMessage - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Trying to make " % " sign in a ClientMessage (/showthread.php?tid=98451)



[SOLVED] Trying to make " % " sign in a ClientMessage - silvan - 20.09.2009

i'm trying to add a % sign... in a client text.. which it aint working. i'm using this:

Code:
format(string, sizeof(string),"SAC: You healed %s to 100\%",PlayerInfo[giveplayerid][name]);
SendClientMessage(playerid,COLOR_BRIGHTRED,string);
The message it does display but the " % " sign don't... i read on wiki that if i need to make an escape character which it soppose to be written in the string... add an " \ " infront of the sign... but still don't work even i tried " \%; " which also didn't worked both occasions i got no errors at all... but that symbol is not displaying. I tried it with " %" alone.. no other chars and still.... didn't showed up


Re: [Help] Trying to make " % " sign in a ClientMessage - Joe Staff - 20.09.2009

It's '%%'

Not really a 0.3 issue.


Re: [Help] Trying to make " % " sign in a ClientMessage - silvan - 20.09.2009

that didn't worked :/ it displayed '' also... i'm scripting it in 0.3 so i tghout here is in good section


Re: [Help] Trying to make " % " sign in a ClientMessage - SanMarinoRP - 20.09.2009

true i think its in the whole SAMP thing.. cant change it?


Re: [Help] Trying to make " % " sign in a ClientMessage - silvan - 20.09.2009

well the thing is i saw it in some servers... which i belive that it can be done but i'm not sure how....


Re: [Help] Trying to make " % " sign in a ClientMessage - SanMarinoRP - 20.09.2009

Quote:
Originally Posted by silvan
well the thing is i saw it in some servers... which i belive that it can be done but i'm not sure how....
if you fix it please tell me so too!


Re: [Help] Trying to make " % " sign in a ClientMessage - silvan - 20.09.2009

i'm trying.... when i did \\ it displayed 1 backslash ( " \ " ) which it did exactly how wiki explained but for some reason this damn % don't :/


Re: [Help] Trying to make " % " sign in a ClientMessage - SanMarinoRP - 20.09.2009

Well good luck on it man


Re: [Help] Trying to make " % " sign in a ClientMessage - Mikep. - 20.09.2009

format(string, sizeof(string),"SAC: You healed %s to 100%s",PlayerInfo[giveplayerid][name],"%%");
SendClientMessage(playerid,COLOR_BRIGHTRED,string) ;


Re: [Help] Trying to make " % " sign in a ClientMessage - silvan - 20.09.2009

thanks, Mikep that worked