GetPlayerHealth isn't working right.
#1

Hey, i'm working on an anti-cheat. and lately, i've got a bug,
The checking timer that compares between the health is running every 150 miliseceonds.
I've making that check:
Код:
GetPlayerHealth(playerid, AC_FLOAT[1]);
if(floatround(AC_FLOAT[1], floatround_round) != floatround(GetPlayerHealthEx(playerid), floatround_round))
GetPlayerHealthEx is a pVar that changed with SetPlayerHealthEx.
All mode optimized to the anti-cheat, but i've got a bug with that.
I did a sendclientmessage when he's detecting has a cheater, but when i make command of /Kill, that mean
Код:
SetPlayerHealthEx(playerid, 0.0);
in the gamemode, is detecting that the pVar amount is 0.0, and original health in sa-mp is 100.0, but on-screen, i see 0, on screen i mean to: is empty.

If i'm making the command in the filterscript on the anticheat, it work..
What can be the problem?

Thanks.
Reply


Messages In This Thread
GetPlayerHealth isn't working right. - by AfikAtashga - 09.10.2014, 17:16
Re: GetPlayerHealth isn't working right. - by AfikAtashga - 10.10.2014, 19:35
Re: GetPlayerHealth isn't working right. - by Abagail - 10.10.2014, 19:38
Re: GetPlayerHealth isn't working right. - by AfikAtashga - 10.10.2014, 19:53
Re: GetPlayerHealth isn't working right. - by AfikAtashga - 11.10.2014, 10:21
Re: GetPlayerHealth isn't working right. - by AfikAtashga - 11.10.2014, 21:22
Re: GetPlayerHealth isn't working right. - by AfikAtashga - 14.10.2014, 10:24

Forum Jump:


Users browsing this thread: 4 Guest(s)