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
#2

UP..
Reply
#3

Show your SetPlayerHealthEx command. Perhaps, - you don't ACTUALLY set the player's health?
Reply
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Show your SetPlayerHealthEx command. Perhaps, - you don't ACTUALLY set the player's health?
I did, and i said, when i make the command in the filterscript of the anticheat and not in the gamemode it work..

Код:
#define SetPlayerHealthEx(%0,%1) SetPlayerHealth(%0, %1); SetPVarFloat(%0, "PlayerHealth", %1)
Reply
#5

UP..
Reply
#6

UPUP
Reply
#7

UP..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)