SA-MP Forums Archive
Weapon hack anticheat exeption - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapon hack anticheat exeption (/showthread.php?tid=443593)



Weapon hack anticheat exeption - Triphon - 12.06.2013

Hello everyone,
Well I am a basic scripter and I have some problems making an exeption for a CMD that gives weapons, I want to make one for it because when players do it they get banned by the server bot.
I don't know if I should make it as :
Код:
if(PlayerInfo[playerid][Admin] >= 1 || IsPlayerAdmin(playerid)) return 1;
if(strcmp(cmdtext, "/(CMD I want)", true) == 0)

    {
		if(GetPlayerState(playerid) == PLAYER_STATE_NONE) return 1;
        {
after the "{" comes the anticheat

Thanks for reading


Re: Weapon hack anticheat exeption - park4bmx - 12.06.2013

you need to make a variable for your player that will tell the anti cheat that the player is allowed the weapon.


Re : Weapon hack anticheat exeption - Triphon - 13.06.2013

I know but the variable is their score so I am afraid that the player who have the variable could hack without doing the cmd


Re: Weapon hack anticheat exeption - Vince - 13.06.2013

In its most simple form you need only check if the players have more ammo than the server has given them. Hook GivePlayerWeapon (or write a custom function) to increment an ammo counter on the server side. Who cares if they have less ammo? It only becomes a problem if their ammo stays the same or if they have more ammo than the server has given them


Re : Weapon hack anticheat exeption - Triphon - 13.06.2013

Thanks for the reply that should work