SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 29/12/2010, 03:01 PM   #1
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Server Side [HP,HV,MONEY,AP]

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
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 29/12/2010, 03:08 PM   #2
HyperZ
High-roller
 
HyperZ's Avatar
 
Join Date: Aug 2009
Posts: 1,340
Reputation: 66
Default Re: Server Side [HP,HV,MONEY,AP]

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

Nice FS btw.
__________________
HyperZ is offline   Reply With Quote
Old 29/12/2010, 03:09 PM   #3
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Server Side [HP,HV,MONEY,AP]

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

/\ i not use tradutor
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 29/12/2010, 03:10 PM   #4
HyperZ
High-roller
 
HyperZ's Avatar
 
Join Date: Aug 2009
Posts: 1,340
Reputation: 66
Default Re: Respuesta: Server Side [HP,HV,MONEY,AP]

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 .
__________________
HyperZ is offline   Reply With Quote
Old 29/12/2010, 03:10 PM   #5
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Re: Respuesta: Server Side [HP,HV,MONEY,AP]

Quote:
Originally Posted by Clive View Post
ahh ok lol np nice fs man .
what is np ?
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 29/12/2010, 03:13 PM   #6
Ricop522
High-roller
 
Ricop522's Avatar
 
Join Date: Feb 2010
Location: ES
Posts: 2,640
Reputation: 159
Default Re: Respuesta: Re: Respuesta: Server Side [HP,HV,MONEY,AP]

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

Cool FS, I like that.
__________________
"Any fool can write code that a
computer can understand. Good
programmers write code that
humans can understand."

AJUDA! Programação
Github
Ricop522 is offline   Reply With Quote
Old 29/12/2010, 03:14 PM   #7
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Server Side [HP,HV,MONEY,AP]

Valeu Ricop
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 29/12/2010, 06:45 PM   #8
GaGlets(R)
Gangsta
 
GaGlets(R)'s Avatar
 
Join Date: Oct 2009
Posts: 791
Reputation: 3
Default Re: Server Side [HP,HV,MONEY,AP]

Crazy sh.. Suspected heathacks un sprunk/food machines. lolmao?
GaGlets(R) is offline   Reply With Quote
Old 29/12/2010, 07:09 PM   #9
ipsBruno
Godfather
 
ipsBruno's Avatar
 
Join Date: Apr 2010
Location: Brazil, Caxias RS
Posts: 6,084
Reputation: 545
Default Respuesta: Re: Server Side [HP,HV,MONEY,AP]

Quote:
Originally Posted by GaGlets(R) View Post
Crazy sh.. Suspected heathacks un sprunk/food machines. lolmao?
Not,GetPlayerMoney --'
__________________
https://github.com/ipsBruno
ipsBruno is offline   Reply With Quote
Old 30/12/2010, 06:02 PM   #10
[M.A]Angel[M.A]
Huge Clucker
 
[M.A]Angel[M.A]'s Avatar
 
Join Date: Dec 2010
Location: Israel
Posts: 394
Reputation: 4
Default Re: Server Side [HP,HV,MONEY,AP]

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;
}
[M.A]Angel[M.A] is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [INC] xMoney: Server-side money system! Zimon95 Includes 19 10/09/2011 12:55 PM
[FilterScript] Ultimate Anti Money Hackers | Server Side Money ipsBruno Filterscripts 48 10/09/2011 06:49 AM
[Include] Server-sided Money - Stop money hackers! NEW RELEASE(v6) x-cutter Includes 107 30/08/2011 07:56 PM
[INC + FS] Server Side Money (Cash) (+ TextDraw) (SscreenShot Added) Oxside Filterscripts 25 21/07/2010 06:11 PM


All times are GMT. The time now is 09:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.