SA-MP Forums Archive
Wont Drop Weapon - 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: Wont Drop Weapon (/showthread.php?tid=653234)



Wont Drop Weapon - NoteND - 29.04.2018

Hey!

Currently scripted /drop command.. why wouldnt this command make a pickup of a gun?

Quote:

CMD:drop(playerid, params[])
{
for (new i = 0; i <= 12; i++)
{
new weapID, ammo, Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
GetPlayerWeaponData(playerid, i, weapID, ammo);
CreatePickup(weapID, 3, x, y, z, 0);
}
return 1;
}




Re: Wont Drop Weapon - Abagail - 29.04.2018

There are many things wrong with this: All in all, this code is simply wrong. What specifically do you want to do? Drop all weapons permanently or allow players to retrieve them?


Re: Wont Drop Weapon - NoteND - 29.04.2018

basically, drop a weapon player is currently holding, and make it a pickup for next player.