CLEO Help Calculating with variables

CLEO related
Status
Not open for further replies.

peakdon

New member
Joined
Jun 16, 2016
Messages
1
Reaction score
0
Hey, I need help with following problem.
I got these two Variables which i would like to add together into a new one

10@ = SAMP.GetPlayerHealthByActorHandle(3@)
11@ = SAMP.GetPlayerArmorByActorHandle(3@)

i.E the player has 40 health and 30 armor. the new variable should be 70. I'd be glad to get some help for other math operations aswell if it is possible.
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,127
Solutions
1
Reaction score
158
hi, you could use these:
005A: 3@ += 1@ // (int)
005B: 4@ += 17@ // (float)

I'm not sure but I think that hp and armor have float values. To find opcodes for other math operations you could type math operators "+ - = / *" in the search tool (crtl+alt+2 in sannybuilder).
Btw by using the opcodes below you can copy variables
0085: 13@ = 12@ // (int)
0087: 17@ = 3@ // (float)
 
Status
Not open for further replies.
Top