Anti Cheat -
Biess - 25.01.2013
Hey! i need help starting of with my Anti-Hack, i use ZCMD and SII include
If someone could give me a base it would be nice.
AW: Anti Cheat -
Blackazur - 25.01.2013
Maybe something like Anti Jetpack Cheat:
Код:
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
{
Ban(i);
}
I dont know if it will help you, you can too looking for JunkBuster and some other Anti Cheat Tools here in the forums.
Re: Anti Cheat -
Biess - 25.01.2013
Yeah, i want anti weapon hack for Minigun, Heatseeker
BUT i want that admins can't be banned
if(PInfo[playerid][Level] < 1)
Re: Anti Cheat -
SAMPHacker - 25.01.2013
Lets say you want to ban any one who have a minigun,
PHP код:
forward AntiCheat(); //forwarding a public function so we can use it later
public AntiCheat() //the function we forwarded later
{
for(new i = 0; i < MAX_PLAYERS; i++) //loop through all the players
{
if(IsPlayerConnected(i)) //check for the result from the loop
{
new Weapon; //creating var named Weapo
Weapon = GetPlayerWeapon(i); //putting info in the var weapon
if(Weapon == 38 && PInfo[playerid][Level] == 0)//if the current weapon is 38 (minigun) and the player isn't admin
{
BanEx(i,"Minigun");//ban the player
}
}
}
}
public OnGameModeInit()
{
SetTimer("AntiCheat",1,true);//call the function AntiCheat every 1 milisec
}
Respuesta: Re: Anti Cheat -
RiChArD_A - 25.01.2013
Quote:
Originally Posted by SAMPHacker
Lets say you want to ban any one who have a minigun,
PHP код:
forward AntiCheat(); //forwarding a public function so we can use it later
public AntiCheat() //the function we forwarded later
{
for(new i = 0; i < MAX_PLAYERS; i++) //loop through all the players
{
if(IsPlayerConnected(i)) //check for the result from the loop
{
new Weapon; //creating var named Weapo
Weapon = GetPlayerWeapon(i); //putting info in the var weapon
if(Weapon == 38 && PInfo[playerid][Level] == 0)//if the current weapon is 38 (minigun) and the player isn't admin
{
BanEx(i,"Minigun");//ban the player
}
}
}
}
public OnGameModeInit()
{
SetTimer("AntiCheat",1,true);//call the function AntiCheat every 1 milisec
}
|
Hi, I tried this but I got errors
Код:
gamemodes\DM.pwn(3455) : error 017: undefined symbol "PInfo"
gamemodes\DM.pwn(3455) : error 017: undefined symbol "playerid"
gamemodes\DM.pwn(3455) : error 029: invalid expression, assumed zero
gamemodes\DM.pwn(3455) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: Anti Cheat -
Biess - 25.01.2013
Quote:
Originally Posted by SAMPHacker
Lets say you want to ban any one who have a minigun,
PHP код:
forward AntiCheat(); //forwarding a public function so we can use it later
public AntiCheat() //the function we forwarded later
{
for(new i = 0; i < MAX_PLAYERS; i++) //loop through all the players
{
if(IsPlayerConnected(i)) //check for the result from the loop
{
new Weapon; //creating var named Weapo
Weapon = GetPlayerWeapon(i); //putting info in the var weapon
if(Weapon == 38 && PInfo[playerid][Level] == 0)//if the current weapon is 38 (minigun) and the player isn't admin
{
BanEx(i,"Minigun");//ban the player
}
}
}
}
public OnGameModeInit()
{
SetTimer("AntiCheat",1,true);//call the function AntiCheat every 1 milisec
}
|
repped
Re: Anti Cheat -
DaRk_RaiN - 25.01.2013
You have actually set a 1 MS running timer, how much lag will that produce huh?
Advise:Rather use OnPlayerUpdate Or make the timer 2000 which is 2 seconds.
Re: Anti Cheat -
SAMPHacker - 25.01.2013
Quote:
You have actually set a 1 MS running timer, how much lag will that produce huh?
Advise:Rather use OnPlayerUpdate Or make the timer 2000 which is 2 seconds.
|
your 100% right, that will decrease the pc memory alot try make it 2000 like he said
Re: Anti Cheat -
Biess - 25.01.2013
Quote:
Originally Posted by SAMPHacker
your 100% right, that will decrease the pc memory alot try make it 2000 like he said ![Smiley](images/smilies/smile.png)
|
Will do.
EDIT: How can i make it that it bans for more weapons without creating more timers? i currently only have minigun ban.
I want it to ban Night Vision Goggles, Infared Goggles,HS Rocket
pawn Код:
forward AntiCheat(playerid);
public AntiCheat(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new Weapon;
Weapon = GetPlayerWeapon(i);
if(Weapon == 38 && PInfo[playerid][Level] == 0)
{
new name[MAX_PLAYER_NAME], string[124+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), " [BOT] has Banned %s: Reason: Minigun Hacks ", name);
SendClientMessageToAll(red, string);
BanEx(i,"Minigun");
}
}
}
}
Re: Anti Cheat -
Biess - 26.01.2013
bumb