SA-MP Forums Archive
How to disable weapon pickup? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to disable weapon pickup? (/showthread.php?tid=566347)



How to disable weapon pickup? - Sc0pion - 05.03.2015

Fixed!


Re: How to disable weapon pickup? - CalvinC - 05.03.2015

Well it's scripted in your script then, it's not a SAMP function by default, you'll have to find the script that does this, and delete it.
You should be able to find it's code in OnPlayerDeath.


Re: How to disable weapon pickup? - Sc0pion - 05.03.2015

Fixed!


AW: How to disable weapon pickup? - Kaliber - 05.03.2015

Quote:

for(new w; w<13; w++)
{
GetPlayerWeaponData(playerid, w, _w, _a);
CreateAutoPickup(
( pX + random( 5 ) ),
pY,
pZ,
_w,
_a,
3,
GetPlayerInterior(playerid),
GetPlayerVirtualWorld(playerid));
}

this one


Re: How to disable weapon pickup? - CalvinC - 05.03.2015

And the switch aswell.
pawn Code:
if(GetPlayerWantedLevel(playerid) > 1)
    {
            switch( random(5) )
        {
            case 0: CreateAutoPickup(
                        ( pX + random( 5 ) ),
                        pY,
                        pZ,
                        PICKUP_MODEL_HEALTH,
                        100,
                        3,
                        GetPlayerInterior(playerid),
                        GetPlayerVirtualWorld(playerid),
                        10000);
            case 1: CreateAutoPickup(
                        ( pX + random( 5 ) ),
                        pY,
                        pZ,
                        PICKUP_MODEL_ARMOR,
                        100,
                        3,
                        GetPlayerInterior(playerid),
                        GetPlayerVirtualWorld(playerid),
                        10000);
            case 2: CreateAutoPickup(
                        ( pX + random( 5 ) ),
                        pY,
                        pZ,
                        PICKUP_MODEL_CASH,
                        103 + random( 1000 ),
                        3,
                        GetPlayerInterior(playerid),
                        GetPlayerVirtualWorld(playerid),
                        10000);
            case 3: CreateAutoPickup(
                        ( pX + random( 5 ) ),
                        pY,
                        pZ,
                        PICKUP_MODEL_PARACHUTE,
                        1,
                        3,
                        GetPlayerInterior(playerid),
                        GetPlayerVirtualWorld(playerid),
                        10000);
            case 4: CreateAutoPickup(
                        ( pX + random( 5 ) ),
                        pY,
                        pZ,
                        PICKUP_MODEL_JETPACK,
                        1,
                        3,
                        GetPlayerInterior(playerid),
                        GetPlayerVirtualWorld(playerid),
                        10000);
        }
    }



Re: How to disable weapon pickup? - Sc0pion - 05.03.2015

Fixed!


Re: How to disable weapon pickup? - CalvinC - 05.03.2015

Oh okay, then just remove the bit Kaliber pointed out.


Re: How to disable weapon pickup? - Sc0pion - 05.03.2015

Fixed!


AW: Re: How to disable weapon pickup? - Kaliber - 05.03.2015

Quote:
Originally Posted by Sc0pion
View Post
When I remove only that this is what I receive

Code:
D:\Servers\San Andreas - Gang War\gamemodes\SA-GW.pwn(3737) : warning 203: symbol is never used: "_a"
D:\Servers\San Andreas - Gang War\gamemodes\SA-GW.pwn(3737) : warning 203: symbol is never used: "_w"
Look at this line:

Code:
new _w, _a, Float:pX, Float:pY, Float:pZ;
write it to this:

Code:
new Float:pX, Float:pY, Float:pZ;
Greekz


Re: AW: Re: How to disable weapon pickup? - Sc0pion - 05.03.2015

Fixed!