[Tutorial] How to disable drive-by's in SA-MP 0.3c
#24

Both of your solutions are not complete, for the first it disables drive-by completly,
second when you have a smg like tec,uzi or mp5 but you enter as a passager holding
a weapon that is in the exepctions, you still wont be able to drive-by even you
have the alowed weapons.
My soltuion was mod the script of mister __ (lol @ the name btv )

pawn Code:
new uberhaxeddbweps[] =
    {24, 25, 26}; //Disalowed drive-by weapons.
   
new smgs[] =
    {29, 28, 32}; //Alowed drive-by weapons.
   
if(newstate == PLAYER_STATE_PASSENGER) {
        for(new i = 0; i < sizeof(uberhaxeddbweps); i++) {
            if(GetPlayerWeapon(playerid) == uberhaxeddbweps[i]) SetPlayerArmedWeapon(playerid, 1);
            else
            {
                SetPlayerArmedWeapon(playerid, smgs[i]);
            }
        }
    }
    return 1;
}
This turns the drive-by to like it was before 0.3c,
Its tested and only issue i found is that when you have Brass Knuckles,
when you enter as passager it sets your armed weapon to fists for some reason.
When you get out the car, and switch weapons, you have the Brass Knuckles back :P

I tried something to solve this issue

pawn Code:
new fists[] =
    {0, 1};

//onplayerstatechange
if(GetPlayerWeapon(playerid) == uberhaxeddbweps[i]) SetPlayerArmedWeapon(playerid, fists[i]);
but it didnt worked for some reason :/

if theres any 1337 scripter that can make this even more better,
your welcome
Regards.
Reply


Messages In This Thread
How to disable drive-by's in SA-MP 0.3c - by Scenario - 19.12.2010, 03:28
Re: How to disable drive-by's in SA-MP 0.3c - by X35B - 19.12.2010, 03:35
Re: How to disable drive-by's in SA-MP 0.3c - by Scenario - 19.12.2010, 03:36
Re: How to disable drive-by's in SA-MP 0.3c - by Stefan_Toretto - 19.12.2010, 05:52
Re: How to disable drive-by's in SA-MP 0.3c - by MestreKiller - 19.12.2010, 12:40
Re: How to disable drive-by's in SA-MP 0.3c - by blackwave - 19.12.2010, 12:45
Re: How to disable drive-by's in SA-MP 0.3c - by Flyfishes - 19.12.2010, 12:50
Re: How to disable drive-by's in SA-MP 0.3c - by Scenario - 19.12.2010, 14:54
Re: How to disable drive-by's in SA-MP 0.3c - by __ - 19.12.2010, 15:05
Re: How to disable drive-by's in SA-MP 0.3c - by ToPhrESH - 22.12.2010, 04:09
Re: How to disable drive-by's in SA-MP 0.3c - by GoldenM4 - 22.12.2010, 04:11
Re: How to disable drive-by's in SA-MP 0.3c - by BittleRyan - 22.12.2010, 07:24
Re: How to disable drive-by's in SA-MP 0.3c - by SkizzoTrick - 22.12.2010, 08:48
Re: How to disable drive-by's in SA-MP 0.3c - by Scenario - 22.12.2010, 15:01
Re: How to disable drive-by's in SA-MP 0.3c - by Mean - 25.12.2010, 16:45
Respuesta: How to disable drive-by's in SA-MP 0.3c - by anonymousx - 26.12.2010, 05:57
Re: Respuesta: How to disable drive-by's in SA-MP 0.3c - by Scenario - 26.12.2010, 15:33
Re: Respuesta: How to disable drive-by's in SA-MP 0.3c - by SkizzoTrick - 27.12.2010, 23:47
Re: Respuesta: How to disable drive-by's in SA-MP 0.3c - by admantis - 27.12.2010, 23:59
Re: How to disable drive-by's in SA-MP 0.3c - by Fool - 28.12.2010, 08:46
Re: How to disable drive-by's in SA-MP 0.3c - by Scenario - 28.12.2010, 17:27
Re: How to disable drive-by's in SA-MP 0.3c - by DVDK - 28.12.2010, 17:55
Re: How to disable drive-by's in SA-MP 0.3c - by Scenario - 28.12.2010, 20:59
Re: How to disable drive-by's in SA-MP 0.3c - by OldDirtyBastard - 01.01.2011, 11:04
Respuesta: Re: Respuesta: How to disable drive-by's in SA-MP 0.3c - by anonymousx - 02.01.2011, 21:25

Forum Jump:


Users browsing this thread: 1 Guest(s)