[FilterScript] Server Side [HP,HV,MONEY,AP]
#1

Introduction:
I Create it simple anti-hack on based in Server Sides.

Functions:

• Anti Regeneration Health Player
• Anti Regeneration Armour Player
• Anti Regeneration Health Cars
• Anti Money Hacking's

Code
pawn Code:
/*
    ________________________________________________________________________
    |                _______  ______   _                                   |
    |               (  ____ \(  ____ \| \    /\                            |
    |               | (    \/| (    \/|  \  / /                            |
    |               | (__    | (__    |  |_/ /                             |
    |               |  __)   |  __)   |   _ (                              |
    |               | (      | (      |  | \ \                             |
    |               | )      | (____/\|  /  \ \                            |
    |               |/       (_______/|_/    \/                            |
    |                                                                      |
    |                   Created By DraKiNs                                 |
    |                                                                      |
    |         [FeK]Company clan of Programmers and Scripters               |
    |______________________________________________________________________|
                       www,feksquad,net

                   Atualizado Data 29/12/2010

               Acesse Nosso Blog para mais Atualizaзхes

                      Deixe os Crйditos!

--------------- Functions -------------------
Anti Regeneration HP
Anti Regeneration AP
Anti Regeneration HV
Anti Money Hacking's
--------------------------------------------
                                                                                                                                                    */

#include <a_samp>

#define SLOTS   50          //- define your slots of server
#define VEHIC   2000        //- define number max of cars in you server

forward iCheckingHealth();
forward iCheckingMoney();

new
    Float:zHealth[ (SLOTS) ],
    Float:sHealth[ (SLOTS) ],
    Float:vHealth[ (VEHIC) ],
    Float:cHealth[ (VEHIC) ],
    Float:zArmour[ (SLOTS) ],
    Float:sArmour[ (SLOTS) ],
    bool:iPlayers[ (SLOTS) ],
    UsingiMoney  [ (SLOTS) ]
;

public
    OnGameModeInit( )
{
    printf("Anti Regeneration HP - By DraKiNs");
    printf(" Look www.projetos.feksquad.net");
    CallRemoteFunction("iCheckingMoney", "", "");
    return true;
}
public
    OnPlayerConnect( playerid )
{
    iPlayers[ playerid ] = true;
    zHealth[ playerid ] = 0.0;
    sHealth[ playerid ] = 0.0;
    return true;
}  

public
    OnPlayerEnterVehicle(playerid , vehicleid)
{
    GetVehicleHealth(vehicleid,cHealth[ vehicleid ] );
    return true;
}

public
    OnPlayerExitVehicle(playerid , vehicleid)
{
    GetVehicleHealth(vehicleid,cHealth[ vehicleid ] );
    return true;
}

public
    OnPlayerDisconnect( playerid , reason )
{
    iPlayers[ playerid ] = false;
    return true;
}

public
    iCheckingMoney( )
{
    for(new iPlayer = 0; iPlayer < (SLOTS) ; iPlayer++)
        if(iPlayers[ iPlayer ] == true)
            UsingiMoney[ iPlayer ] = GetPlayerMoney ( iPlayer );
    SetTimer("iCheckingHealth",1500,false);
    return true;
}

public
    iCheckingHealth( )
{
    for(new iPlayer = 0; iPlayer < (SLOTS) ; iPlayer++)
    {
        if(iPlayers[ iPlayer ] == true)
        {
            GetPlayerHealth( iPlayer,zHealth[ iPlayer ] );
            if(zHealth[ iPlayer ] > 0 && sHealth[ iPlayer ] < zHealth[ iPlayer ] )
            {
                if(UsingiMoney[ iPlayer ] > GetPlayerMoney( iPlayer ) )
                {
                    SendClientMessage(iPlayer,0xFF0000AA, "[INFO] Your Health is Seted (Suspect Hacks)");
                    zHealth[ iPlayer ] = sHealth[ iPlayer ];
                }
            }
            SetPlayerHealthEx(iPlayer,zHealth[ iPlayer ]);
            GetPlayerArmour( iPlayer,zArmour[ iPlayer ] );
            if(zArmour[ iPlayer ] > 0 && sArmour[ iPlayer ] < zArmour[ iPlayer ] )
            {
                if(UsingiMoney[ iPlayer ] > GetPlayerMoney( iPlayer ) )
                {
                    SendClientMessage(iPlayer,0xFF0000AA, "[INFO] Your Armour is Seted (Suspect Hacks)");
                    zArmour[ iPlayer ] = sArmour[ iPlayer ];
                }
            }
            SetPlayerArmourEx(iPlayer,zArmour[ iPlayer ]);
            new iVehicle = GetPlayerVehicleID( iPlayer );
            if(iVehicle > -1)
            {
                GetVehicleHealth(iVehicle,vHealth[ iVehicle ] );
                if(vHealth[ iVehicle ] > 0 && cHealth[ iVehicle ] < vHealth[ iVehicle ] )
                {
                    if(UsingiMoney[ iPlayer ] > GetPlayerMoney( iPlayer ) )
                    {
                        SendClientMessage(iPlayer,0xFF0000AA, "[INFO] Your Health Vehicle is Seted (Suspect Hacks)");
                        vHealth[ iVehicle ] = cHealth[ iVehicle ];
                    }
                }
                SetVehicleHealthEx(iVehicle,vHealth[ iVehicle ]);
            }
            if(UsingiMoney[ iPlayer ] < GetPlayerMoney( iPlayer ) )
            {
                GivePlayerMoneyEx(iPlayer,UsingiMoney[ iPlayer ] - GetPlayerMoney( iPlayer ));
                SendClientMessage(iPlayer,0xFF0000AA, "[INFO] Your Money is Seted (Suspect Hacks)");
            }
        }
    }
    SetTimer("iCheckingMoney",1500,false);
    return true;
}

stock
    SetPlayerHealthEx(iPlayer,Float:iHealth)
{
    sHealth[ iPlayer ] = iHealth;
    return SetPlayerHealth(iPlayer,iHealth);
}

stock
    SetVehicleHealthEx(iVehicle,Float:fHealth)
{
    cHealth[ iVehicle ] = fHealth;
    return SetVehicleHealth(iVehicle,fHealth);
}

stock
    GivePlayerMoneyEx(iPlayer,fMoney)
{
    UsingiMoney[ iPlayer ] = fMoney;
    return GivePlayerMoney(iPlayer,fMoney);
}

stock
    SetPlayerArmourEx(iPlayer,Float:fArmour)
{
    sArmour[ iPlayer ] = fArmour;
    return SetPlayerArmour(iPlayer,fArmour);
}
Change Functions:

Code:
SetPlayerArmour -> SetPlayerArmourEx
SetPlayerHealth ->  SetPlayerHealthEx
GivePlayerMoney -> GivePlayerMoneyEx
SetVehicleHealth -> SetVehicleHealthEx
Created:
Developed by [FeK]DraKiNs

Obs: I Not Testing - Only Health and Money
Reply
#2

But im sorry 'Developer by [FeK]DraKiNs' or 'Developed By [FeK]DraKiNs'?

Nice FS btw.
Reply
#3

Sorry,i am not use ****** translator,and my english is bad

/\ i not use tradutor
Reply
#4

Quote:
Originally Posted by [FeK]DraKiNs
View Post
Sorry,i am not use ****** translator,and my english is bad

/\ i not use tradutor
ahh ok lol np nice fs man .
Reply
#5

Quote:
Originally Posted by Clive
View Post
ahh ok lol np nice fs man .
what is np ?
Reply
#6

Quote:
Originally Posted by [FeK]DraKiNs
View Post
what is np ?
No problem.
(sem problemas)

Cool FS, I like that.
Reply
#7

Valeu Ricop
Reply
#8

Crazy sh.. Suspected heathacks un sprunk/food machines. lolmao?
Reply
#9

Quote:
Originally Posted by GaGlets®
View Post
Crazy sh.. Suspected heathacks un sprunk/food machines. lolmao?
Not,GetPlayerMoney --'
Reply
#10

Lol nice FS man

Quote:

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_GREEN, "Welcome !", pName, playerid);
return 1;
}

public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid, COLOR_ANGRY,"GET OUT BABY");
Ban(playerid);
return 1;
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)