24.06.2010, 20:42
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);
}
}
}
\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?