anti-inv.
#10

Probably not. You don't have to use the hole script. Take an example:

pawn Code:
new Float:hh1[MAX_PLAYERS];

forward HealthHack(playerid,playa);
public HealthHack(playerid,playa)
{
    new Float:hh2;
    new string[128];
    GetPlayerHealth(playa,hh2);
    if(hh2 == 100)
    {
        format(string,sizeof(string),"%s Was HH Tested By %s And Returned {AA3333}POSITIVE {B4B5B7}for hacks",PlayerNameEX(playa), PlayerNameEX(playerid));
        SendClientMessage(playerid,0xAFAFAFAA,string);
    }
    else
    {
        format(string,sizeof(string),"%s Was HH Tested By %s And Returned {33AA33}NEGATIVE {B4B5B7}for hacks",PlayerNameEX(playa), PlayerNameEX(playerid));
        SendClientMessage(playerid,0xAFAFAFAA,string);
        SetPlayerHealth(playa,hh1[playa]);
    }
    return 1;
}

CMD:hh(playerid, params[])
{
    new playa, level;
    new Float:slx, Float:sly, Float:slz;
    if(sscanf(params, "ui", playa, level))
    {
        SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /hh [playerid/PartOfName] [level 1-2]");
        SendClientMessage(playerid, 0xAFAFAFAA, "HINT:  Level 1(invisible) / Level 2 (visible) (more accurate)");
        return SendClientMessage(playerid, 0xAA3333AA, "WARNING:  Spamming this command will lead to incorrect outcomes");
    }
    if(IsPlayerConnected(playa)) return SendClientMessage(playerid,-1,"Player Not Connected!");
    if(level < 1 || level > 2) return SendClientMessage(playerid, 0xAFAFAFAA, "Level cannot be bellow 1 or above 2");
    if(level == 1)
    {
        new playerState = GetPlayerState(playa);
        if (playerState == PLAYER_STATE_PASSENGER || playerState == PLAYER_STATE_DRIVER)
        {
            GetPlayerPos(playa, slx, sly, slz);
            SetPlayerPos(playa, slx-3, sly, slz);
        }
        GetPlayerHealth(playa,hh1[playa]);
        SetPlayerHealth(playa,100);
        GetPlayerVelocity(playa,slx, sly, slz);
        SetPlayerVelocity(playa,slx, sly, slz-0.375);
        SetTimerEx("HealthHack",200,false,"ii",playerid,playa);
    }
    else if(level == 2)
    {
        GetPlayerHealth(playa,hh1[playa]);
        SetPlayerHealth(playa,100);
        GetPlayerPos(playa, slx, sly, slz);
        SetPlayerPos(playa, slx, sly, slz+10);
        CreateExplosion(slx, sly, slz+10, 12, 1);
        SetTimerEx("HealthHack",500,false,"ii",playerid,playa);
    }
    return 1;
}
You can use it like this, just to use only with a command, maybe when someone report player that have god?
Reply


Messages In This Thread
anti-inv. - by audriuxxx - 04.05.2013, 08:32
Re: anti-inv. - by ]Rafaellos[ - 04.05.2013, 08:37
Re: anti-inv. - by audriuxxx - 04.05.2013, 08:43
Re: anti-inv. - by Yashas - 04.05.2013, 08:47
Re: anti-inv. - by audriuxxx - 04.05.2013, 08:52
Re: anti-inv. - by Yashas - 04.05.2013, 08:55
Re: anti-inv. - by audriuxxx - 04.05.2013, 09:00
Re: anti-inv. - by ]Rafaellos[ - 04.05.2013, 09:13
Re: anti-inv. - by audriuxxx - 04.05.2013, 09:27
Re: anti-inv. - by ]Rafaellos[ - 04.05.2013, 10:18

Forum Jump:


Users browsing this thread: 2 Guest(s)