dini_IntSet VS dini_FloatSet - 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: dini_IntSet VS dini_FloatSet (
/showthread.php?tid=419426)
dini_IntSet VS dini_FloatSet -
jakejohnsonusa - 28.02.2013
What is the difference between dini_IntSet and dini_FloatSet ?
Please don't give me a link to dini, thanks in advance!
Re: dini_IntSet VS dini_FloatSet -
LarzI - 28.02.2013
It's quite self-explanatory, really.
IntSet = Set integer (save an integer)
FloatSet = Set float (save a float)
Integers are whole numbers (2, 304, 2384)
Floats are numbers with decimals (2.43, 304.1234, 2384.39943)
Re: dini_IntSet VS dini_FloatSet -
jakejohnsonusa - 28.02.2013
Thanks +1Rep
One more question: what would GetVehicleHealth be? I'm not honestly sure if that uses decimals or not
Respuesta: dini_IntSet VS dini_FloatSet -
Strier - 28.02.2013
https://sampwiki.blast.hk/wiki/GetVehicleHealth
Re: dini_IntSet VS dini_FloatSet -
jakejohnsonusa - 28.02.2013
I looked at that before I asked... in the example it has 1000.0 so does that mean it will be a Float?
Re: dini_IntSet VS dini_FloatSet -
LarzI - 28.02.2013
Quote:
Originally Posted by jakejohnsonusa
I looked at that before I asked... in the example it has 1000.0 so does that mean it will be a Float?
|
To quote:
Quote:
(vehicleid, &Float:health)
vehicleid ID of the vehicle
&Float:health Variable to store the health in, passed by reference
|
As you can see, the 2nd parameter says &Float:health.
The ampersand (&) is just to use a reference variable (the value will save to the variable you used)
The tag "Float:" (You can tell it's a tag because it has a colon behind it) tells you what data-type you have to use. So when it says 'Float:', you'll have to use a float variable, unless you want a tag mismatch error.
TL
R: Yes, you will need a float.
Re: dini_IntSet VS dini_FloatSet -
jakejohnsonusa - 28.02.2013
lol duh, thanks!