SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Bug Reports

Reply
 
Thread Tools Display Modes
Old 29/08/2010, 03:23 AM   #1
Rachael
Huge Clucker
 
Rachael's Avatar
 
Join Date: Feb 2010
Posts: 390
Reputation: 26
Default Mystery weapon appears

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.
Rachael is offline   Reply With Quote
Old 29/08/2010, 03:41 AM   #2
Mark_Weston
Gangsta
 
Mark_Weston's Avatar
 
Join Date: Aug 2010
Location: Winnipeg, Manitoba, Canada
Posts: 981
Reputation: 65
Default Re: Mystery weapon appears

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
Mark_Weston is offline   Reply With Quote
Old 29/08/2010, 03:50 AM   #3
Venturas
Big Clucker
 
Venturas's Avatar
 
Join Date: Jul 2010
Posts: 138
Reputation: 0
Default Re: Mystery weapon appears

Maybe your players are actually hacking.
__________________

Venturas is offline   Reply With Quote
Old 29/08/2010, 03:51 AM   #4
Rachael
Huge Clucker
 
Rachael's Avatar
 
Join Date: Feb 2010
Posts: 390
Reputation: 26
Default Re: Mystery weapon appears

obviously I don't want to delete my anticheat.
Rachael is offline   Reply With Quote
Old 29/08/2010, 04:01 AM   #5
CracK
Huge Clucker
 
CracK's Avatar
 
Join Date: Nov 2007
Posts: 425
Reputation: 2
Default Re: Mystery weapon appears

Maybe you should add one more check?
Like this:
Code:
if(weapon[j] == 36 && ammo) // checks if ammo != 0
CracK is offline   Reply With Quote
Old 29/08/2010, 08:18 AM   #6
Finn
High-roller
 
Join Date: Jan 2008
Posts: 1,691
Reputation: 307
Default Re: Mystery weapon appears

This could be the same bug as this one.
__________________
Finn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GTA SA just don't appears. ZonReim Client Support 5 01/11/2009 05:24 PM
Fatal Errors, Mystery to All [HELP] Delphinus Help Archive 7 30/06/2009 06:45 PM
Command only appears for ID 0 Jakku Help Archive 4 24/05/2009 10:29 AM
when i will run sa-mp it appears a runtime error mikael_greenfly Client Support 13 29/03/2009 06:23 PM


All times are GMT. The time now is 06:39 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.