SetPlayerHealth/Armour GetplayerHealth/Armour fails?
#1

Hello,

My anticheat is working like:
SetPlayerArmour(playerid,75);
pS[Armour] = 75;

And my one second timer detect:

GetPlayerArmour(playerid,pS[ClientArmour);
pS[ClientArmour] == 0.00000
pS[Armour] == 75.0000

Not a problem but then:

pS[Armour = pS[ClientArmour];

And then:

GetPlayerArmour(playerid,pS[ClientArmour);
pS[ClientArmour] == 75.0000
pS[Armour] == 0.0000

And kicked...

So the problem is that sa-mp doesn't really see immediately that a player has get health or armour, but it takes like
0.5 seconds.... And thats a kind of fail...
Question is, is this true or is it me that is doing something wrong?
Reply
#2

Is not you. I think leong(some #s here) reported this problem a while ago. I'm not sure if it also applies to your problem, but you should check the bug report section.
Reply
#3

Yea well, I already found a solution, I just enable a timer every time a player's armour or health has been set, and untill the timer isn't fininshed the server doesn't check for cheats at the player.
And it works so far I tested it.
But thanks for your answer, now i know that it's not by me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)