Anti Health Hack
#10

Aaah.. Sorry
"(844) : warning 202: number of arguments does not match definition "
Edit:
pawn Код:
new Float:HP;
     GetPlayerHealth(PlayerId, HP);
.

And here's another try:
pawn Код:
COMMAND:explode(playerid, params[])
    {
        if(!IsPlayerAdmin(playerid)) // If playerid isn't RCON admin
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "You are not {FF0000}Server Admin!");
            return 1;
        }
        new PlayerId;
        if(sscanf(params, "u", PlayerId))
        {
            SendClientMessage(playerid, 0xFFFFFFFF, "Try again. Usage:{FF0000 }/explode [user id]");
            return 1;
        }

        new Float:Pos[3];
        GetPlayerPos(PlayerId, Pos[0], Pos[1], Pos[2]);

        SendClientMessage(PlayerId, 0xFF0000FF, "Admin has {FF0000}exploded{FFFFFF} you..");

        CreateExplosion(Pos[0], Pos[1], Pos[2], 2, 10.0);
        CheckIsGod(PlayerId);
        return 1;
    }
   
    // ******************
   
    stock CheckIsGod(PlayerId)
    {
        new Float:HP;
       GetPlayerHealth(PlayerId, HP); // Edited!
       
        if(HP == 100)
            return true;
        else if(HP < 100)
            return false;
        return false;
    }
And again.. Does it works or not. Try it.
Okey, now I will explain you.
Funct "CheckIsGod" will return true, if player will have 100 hp, and return false if player has hp less than 100.
Now you're able to use this condition:
pawn Код:
if(CheckIsGod(playerid))
While you use something like above, script will be continued, if function has lastly return true.

Example:
pawn Код:
public OnPlayerUpdate(playerid)
{
if(CheckIsGod(playerid))
{
// Do something here, if this function returned true
}
return 1;
}
CheckIsGod will return true or false ONLY under condition, that this were used (in this case) on command 'explode'.

That's it?
Reply


Messages In This Thread
Anti Health Hack - by Rocketeer - 31.07.2011, 19:16
Re: Anti Health Hack - by wups - 31.07.2011, 19:17
Re: Anti Health Hack - by Kingunit - 31.07.2011, 19:18
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 19:21
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 19:37
Re: Anti Health Hack - by Kingunit - 31.07.2011, 19:40
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 19:44
Re: Anti Health Hack - by Famalamalam - 31.07.2011, 19:47
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 19:50
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 19:55
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 20:08
Re: Anti Health Hack - by Kingunit - 31.07.2011, 20:10
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 20:12
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 20:14
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 20:19
Re: Anti Health Hack - by Kingunit - 31.07.2011, 20:19
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 20:24
Re: Anti Health Hack - by Rocketeer - 31.07.2011, 20:30
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 20:36
Re: Anti Health Hack - by Kingunit - 31.07.2011, 20:49
Re: Anti Health Hack - by LetsOWN[PL] - 31.07.2011, 20:51
Re: Anti Health Hack - by Kingunit - 01.08.2011, 01:30
Re: Anti Health Hack - by Rocketeer - 01.08.2011, 02:48

Forum Jump:


Users browsing this thread: 1 Guest(s)