[TUT REQUEST] Floats
#1

Hi everyone.
I know alot of SA:MP scripting, except the FLOAT FUNCTIONS. I'm not good at math, and there ain't an clear explaination at samp wiki.
So my question is: Can anyone explain me this? - I don't understand it :P (except a few... floatstr, float, floatcmp, floatdiv).

Thanks in advance.

Regards,
Kevin
Reply
#2

I don't know what you mean, what's so hard to understand about float functions? Floats are just a number with a very accurate decimal position. They are allocated more memory in the RAM also, so it can store all of these extra numbers. So what float functions are you talking about? What do you want to know exactly?
Reply
#3

Well, I need it all :P - Some are not on samp wiki.
Without the knowledge I can't make things I want.. For example, my own speed-o-meter (kmp)
Thanks for your response by the way.

Regards,
Kevin
Reply
#4

Im Good At Math
But Don't Know Scripting
Not Trying Too Much Text
Reply
#5

You can use the Float command if your nuber has a "," like: 1,1
(bad description i know xD)
Reply
#6

Does this help you by any bit?
Reply
#7

@Kmitsa:
Thanks but I know that. I think you mean the "new Floattring;". ? - I know that for sure! I mean the functions.
But thanks for your response.

@Vi3t102:
I'm not good at math. That's a 2nd problem. But if I understand the functions more, I think I can do SOMETHING.

And to the rest:
I'm gonna sleep. So I won't response anymore.
And thanks in advance again, and everyone thanks for the responses.

Regards,
Kevin (Kwarde)
Reply
#8

Quote:
Originally Posted by Kwarde
Посмотреть сообщение
Well, I need it all :P - Some are not on samp wiki.
Without the knowledge I can't make things I want.. For example, my own speed-o-meter (kmp)
Thanks for your response by the way.

Regards,
Kevin
Kilometers per hours is an integer (a natural number like 500 or -200 or 1000 w/e), not a float. Floats are mostly used for positions, angles, health, armor. There are very little uses besides that.
Reply
#9

Can't you make a speed-o-meter with GetVehicleVelocity?
Reply
#10

Quote:
Originally Posted by Kmitska
Посмотреть сообщение
You can use the Float command if your nuber has a "," like: 1,1
(bad description i know xD)
Most scripting/programming languages use the american notiation: the dot (.). So your float would become: 1.1

Float is actually an acronym for Floating Point and is, like Kmitska said, just a floating number.

Now, if there are undocumented functions on the wiki and you want to know how they work. Post the functions here or search the forum for the usages : >

Hope I helped you,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)