Floats in Blue'G's R7
#1

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)