SA-MP Forums Archive
Anticheat - Reaction Test - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Anticheat - Reaction Test (/showthread.php?tid=113187)



Anticheat - Reaction Test - Kyle - 12.12.2009

In my server i have a system where it says "First one to type %d Wins Minigun"
Ive coded that but i need it so my anticheat dont ban me.

So what i did was when you win the weapon:

Wonweapon[playerid] = 1;

So when its 1 the anticheat does not ban you

That works but i needed it so when you have no minigun ammo left it does

Wonweapon[playerid] = 0;

So when its 0 it is possible for the anticheat to ban you

So i had to make a timer / public here is my atempt but itbans you but when i comment it out it dont ban you so this is the problem

Thanks!

http://pastebin.com/m348967aa


Re: Anticheat - Reaction Test - miokie - 12.12.2009

Oops, Sorry didn't read properly.

Use: GetPlayerWeaponData to check if the slot for a minigun is filled, then if it isn't filled set it back to 0.

The Slot is 7 for heavy weapons (Rocketlaunchers, miniguns etc...)


Re: Anticheat - Reaction Test - Kyle - 12.12.2009

Can you show me an example please?


Re: Anticheat - Reaction Test - Kyle - 12.12.2009

Double post sorry


Re: Anticheat - Reaction Test - miokie - 12.12.2009

pawn Код:
new weaponid = GetPlayerWeapon(playerid);
if(weaponid == 38 && WonWeapon[playerid] == 0) Ban(playerid);
This checks if the player has a minigun and if the person has won the weapon, in this case they haven't so it bans them.


Re: Anticheat - Reaction Test - Kyle - 12.12.2009

So the public where it changes it back to WonWeapon 0; is fine?


Re: Anticheat - Reaction Test - Kyle - 13.12.2009

Anybody please help?


Re: Anticheat - Reaction Test - Damon_Black - 13.12.2009

I don't know if weapon ammo is synched up now or what.... but what's easiest is to give the player a minigun with a timer and take it away. In the timer you can set the value back to 0.