Weapon hack anticheat exeption
#1

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
Reply
#2

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

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
Reply
#4

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
Reply
#5

Thanks for the reply that should work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)