Need help - 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: Need help (
/showthread.php?tid=619882)
Need help -
NealPeteros - 23.10.2016
Is there something wrong in this line? It says that the arguments doesn't match the definition
PHP код:
CelebrityText = TextDrawCreate(150.0,360.0,"Fans: %d",CelebrityInfo[playerid][cFans]);
Re: Need help -
X337 - 23.10.2016
Check this out: wiki.sa-mp.com/wiki/TextDrawCreate
TextDrawCreate has 3 parameters.
Re: Need help -
NealPeteros - 23.10.2016
Thanks! How can I add a specifier, specifically %d, to a textdraw? Is it possible?
Re: Need help -
Kaliber - 23.10.2016
Yes, use format:
PHP код:
new tmp[11 + 7];
format(tmp,sizeof(tmp),"Fans: %d",CelebrityInfo[playerid][cFans]);
CelebrityText = TextDrawCreate(150.0,360.0,tmp);
Re: Need help -
NealPeteros - 23.10.2016
Forgot everything about format. Thanks! +rep to both of ya'