English Decimal and Divisor Cannot take effect

2 replies
Goto Page
To the start Previous 1 Next To the start
Up
MTF
User
Offline Off
Code:
1
2
local h = player(id,"health")
parse("sethealth "..id.." "..h-weapon*0.3)
or
Code:
1
parse("sethealth "..id.." "..h-weapon/10)
01.10.19 11:14:54 am
Up
Gaios
Security Supporter
Online On
I'm not sure about you but you can use
math.floor
or
math.ceil
anyway.

Or you can use custom health script like this file cs2d [SP] Percent Health Module (8)
01.10.19 11:33:59 am
Up
VADemon
User
Offline Off
Sethealth, health can only take whole integer values, not "0.4". If weapon/10 is < 1.0, it will not have any effect (like h-0).

If you have other problem with the code, show us more of your code.
To the start Previous 1 Next To the start