Problem with Health antihack
#1

pawn Код:
new Float:fHealth;
public Antihack()
{
    new x;
    new Float:rHealth;
    for(x=0;x<MAX_PLAYERS;x++)
    {

    GetPlayerHealth(x, rHealth);

    if(rHealth != GetPVarFloat(x, "faPlayerHealth"))
    {
      // Player health has changed since the last update -> server, so obviously thats the thing updated.
      // Lets do further checks see if he's lost or gained health, anti-health cheat? ;)

      if(rHealth > GetPVarFloat(x, "faPlayerHealth"))
      {
        /* He has gained health! Cheating? Write your own scripts here to figure how a player
            gained health! */

      }
      else
      {
        /* He has lost health! */
      }

      SetPVarFloat(x, "faPlayerHealth", rHealth);
    }
    }
}
Errors are:
\gamemodes\plaster.pwn(8294) : error 017: undefined symbol "GetPVarFloat"
\gamemodes\plaster.pwn(8299) : error 017: undefined symbol "GetPVarFloat"
\gamemodes\plaster.pwn(8309) : error 017: undefined symbol "SetPVarFloat"
why those errors?
Reply
#2

Are you sure you use SA-MP 0.3a R6 or newer server package?
Reply
#3

Deam that was the problem i had R4 Pawno
Reply
#4

update to rc7
Reply
#5

rc8*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)