29.12.2010, 15:01
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
Change Functions:
Created:
Developed by [FeK]DraKiNs
Obs: I Not Testing - Only Health and Money
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);
}
Code:
SetPlayerArmour -> SetPlayerArmourEx SetPlayerHealth -> SetPlayerHealthEx GivePlayerMoney -> GivePlayerMoneyEx SetVehicleHealth -> SetVehicleHealthEx
Developed by [FeK]DraKiNs
Obs: I Not Testing - Only Health and Money