Mystery weapon appears
#1

I don't know if this is a bug, or an error on my part. This did not occur in previous versions of samp, it has started happening with 0.3b

Players are getting autobanned for heat seeking missile launcher ( weapon ID 36 ) detection. I have found it occurs when they enter a vehicle, and have deduced that it may be my anti drivershooting script.

under OnPlayerStateChange
pawn Code:
if(newstate == PLAYER_STATE_DRIVER)
     {
        new newcar = GetPlayerVehicleID(playerid);

        new gun, ammo;
        GetPlayerWeaponData(playerid,4,gun,ammo);
        if(gun == 29)
        {
            GivePlayerWeapon(playerid,29,-ammo);
            PutPlayerInVehicle(playerid,newcar,0);
        }
    }
and this is the script that autobans them ( simplified for this example )

pawn Code:
for (new j=12; j>0; j--)
{
GetPlayerWeaponData(playerid,j,weapon[j],ammo);
if(weapon[j] == 36)
{
    ... ban script

}
if anyone has any idea why this is happenning I would be grateful. Similarly if anyone knows a different and perhaps more efficient way to stop drivershooting.
Reply
#2

just delete this function
for (new j=12; j>0; j--)
{
GetPlayerWeaponData(playerid,j,weapon[j],ammo);
if(weapon[j] == 36)
{
... ban script

}
or just chagne weapon id to 1000 or somethin
Reply
#3

Maybe your players are actually hacking.
Reply
#4

obviously I don't want to delete my anticheat.
Reply
#5

Maybe you should add one more check?
Like this:
Code:
if(weapon[j] == 36 && ammo) // checks if ammo != 0
Reply
#6

This could be the same bug as this one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)