armed weapon
#1

Hi,

When i set armed weapon can i give kick if current weapo id don't mach with armed weapon?
I mean does this don't kicks players who is not cheating?
Код:
stock MySetPlayerArmedWeapon( playerid, whatweapon )
{
    SetPlayerArmedWeapon( playerid, whatweapon );
    
    if( GetPlayerWeapon( playerid ) != whatweapon )
    {
        Kick( playerid );
    }
}
Reply
#2

This will probably not work due to the way client-server communication works. If you set something you can't get it back immediately because there hasn't been any time to even send the update to the client.
Reply
#3

I do some test, i have deagle and m4, i use setplayerarmedweapon when with deagle to m4, it's switch my weapon to m4 and print give my 31, weapon id of m4, so it's mean working? Try your self and post results.
Reply
#4

Yes, it might work if you have a low enough ping... but when you introduce lag, desync, packetloss or simply high pings into the equation, you're going to have innocent players kicked. Not sure why holding a different weapon would even be considered cheating, but this is not the right way to approach it...
Reply
#5

No just setplayerarmedweapon can by off by cheats
Reply
#6

Yes, but the same can also be said about GivePlayerWeapon and SetPlayerPos and SetPlayerSkin etc. Cheaters can NOP any function they want, and just because the function didn't affect them, it doesn't mean they are cheating. Desync can also seem like functions have no affect on a player, because they often don't have any affect... You should never 'assume' when making an anti-cheat, you need to consider false positives.

SetPlayerArmedWeapon can also be 'disregarded' by simply changing your weapon.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)