SA-MP Forums Archive
Floats in Blue'G's R7 - 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: Floats in Blue'G's R7 (/showthread.php?tid=441632)



Floats in Blue'G's R7 - [WSF]ThA_Devil - 03.06.2013

Hello, I've been wondering how do you escape float?
I've tried this:
pawn Код:
cache_get_field_content(0, "Health", pInfo[playerid][aHealth]);
that didn't seem to help, I've tried with floatstr and it didn't help neither.


Re: Floats in Blue'G's R7 - Richie© - 03.06.2013

Try this;
pawn Код:
new Health[20];

cache_get_field_content(0, "Health", Health), pInfo[playerid][aHealth] = floatstr(Health);

// Or this way if you want to use R18 or higher
pInfo[playerid][aHealth] =  cache_get_field_content_float(0, "Health");



Re: Floats in Blue'G's R7 - [WSF]ThA_Devil - 03.06.2013

Thanks I used to do R5 - R6 for a long while, then i stopped sa-mp for like 2 months and now getting used to R7 is a lil' bit difficult