dini_IntSet VS dini_FloatSet
#1

What is the difference between dini_IntSet and dini_FloatSet ?

Please don't give me a link to dini, thanks in advance!
Reply
#2

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

Thanks +1Rep

One more question: what would GetVehicleHealth be? I'm not honestly sure if that uses decimals or not
Reply
#4

https://sampwiki.blast.hk/wiki/GetVehicleHealth
Reply
#5

I looked at that before I asked... in the example it has 1000.0 so does that mean it will be a Float?
Reply
#6

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.

TLR: Yes, you will need a float.
Reply
#7

lol duh, thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)