PDA

View Full Version : Weapon hack anticheat exeption


Triphon
12/06/2013, 09:45 PM
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

park4bmx
12/06/2013, 09:52 PM
you need to make a variable for your player that will tell the anti cheat that the player is allowed the weapon.

Triphon
13/06/2013, 08:46 AM
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

Vince
13/06/2013, 08:53 AM
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

Triphon
13/06/2013, 08:58 AM
Thanks for the reply that should work