Anti-cheat for weapons
#1

Hi guys!

Please advise, excellent anti-cheat for weapons.
I need to keep track of not only weapons, but ammo in it.
Reply
#2

Search For one
Reply
#3

I would like to cheat has already been tested in human beings...
Reply
#4

Vou te ensinar como fazer ok?
Primeiro define isso no inicio do seu gm ou fs.

Код:
forward banir(playerid);
new nome[MAX_PLAYER_NAME];
new mbanir[256];
Agora criar uma public com o nome banir(playerid).

Ficara assim seu anti-hack para weapon.
Код:
public banir(playerid)
{
if(GetPlayerWeapon(playerid) == 36)
{
GetPlayerName(playerid,nome,sizeof(nome));
format(mbanir,sizeof(mbanir),"%s Foi kickado do servidor por que esta usando uma arma proibida.",nome);
SendClientMessageToAll(THE COLOR,mbanir);
Kick(playerid);
}
if(GetPlayerWeapon(playerid) == 35)
{
GetPlayerName(playerid,nome,sizeof(nome));
format(mbanir,sizeof(mbanir),"%s Foi kickado do servidor por que esta usando uma Rocket Launcher.",nome);
SendClientMessageToAll(THE COLOR,mbanir);
Kick(playerid);
}
if(GetPlayerWeapon(playerid) == 37)
{
GetPlayerName(playerid,nome,sizeof(nome));
format(mbanir,sizeof(mbanir),"%s Foi kickado do servidor por que esta usando uma Flamethrower.",nome);
SendClientMessageToAll(THE COLOR,mbanir);
Kick(playerid);
}
if(GetPlayerWeapon(playerid) == 38)
{
GetPlayerName(playerid,nome,sizeof(nome));
format(mbanir,sizeof(mbanir),"%s Foi kickado do servidor por que esta usando uma minigun.",nome);
SendClientMessageToAll(THE COLOR,mbanir);
Kick(playerid);
}}
Site: http://sa-mpextreme.blogspot.com
Reply
#5

Requires anti cheat for all weapons with ammo count.
The above was written - to check for weapons...
Reply
#6

Quote:
Originally Posted by cessil
Посмотреть сообщение
Weapon Checking
Under my GiveWeapon stock I set a few variables:
1. they got that weapon.
2. setting the weapon to their weapon slot.
example.
pawn Код:
stock GiveWeapon(playerid,weapon,ammo)
{
    new str[10];
    format(str,sizeof(str),"weap%d",weapon); //format to set the variable
    SetPVarInt(playerid,str,1); //the script now know that the player has had this weapon
    format(str,sizeof(str),"wslot%d",GetWeaponSlot(weapon)); //what weapon is in which slot
    SetPVarInt(playerid,str,weapon);
    GivePlayerWeapon(playerid,weapon,ammo);
}
now in a weapon check in an anticheat, if they spawned an m4 and the PVar weap31 was equal to 0 then they are 99.9% likely to be cheating, however if they have had that weapon before and the script says they are meant to have an ak47 in that weapon slot, then they might be lagging or bugged and timing them out should fix them.
Note that parachutes will be given by the game to players when you jump out of helicopter or plane high up.
This is from cessil's anti cheat tips https://sampforum.blast.hk/showthread.php?tid=220089
Reply
#7

junkbuster?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)