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

The player doesn't loose any weapons during this process. Their equipped weapon is only altered to their fists, which you cannot perform a drive-by with. They may simply scroll through their weapons when they have fully exited the vehicle.
Reply
#22

Tutorial? just 1 line of code i would call it..
Reply
#23

Quote:
Originally Posted by DVDK
View Post
Tutorial? just 1 line of code i would call it..
Well... yeah. I'll add more to it though, once I get the chance. I know of a couple other ways you could do it.
Reply
#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
#25

Quote:
Originally Posted by SkizzoTrick
View Post
Ohh cmon,another newbie who believes that his the biggest script!
The biggest Communities like LS-RP doesn't allows DB'es.My opinion is that YOU should find another game to play
P.S:My suggestion: Mario.
I don't think so, if you dont like it you should fuck off.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)