How to remove a players 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to remove a players weapon? (
/showthread.php?tid=185380)
How to remove a players weapon? -
DarrenReeder - 24.10.2010
Hello,
I need to remove a players weapon so when i use my "/dump gun" command, it gets rid of their weapon that they are holding... i have a problem though..
At the moment i set the gun in question's ammo, to 0..although this doesnt remove it because if they player then dies, he/she will drop the gun that they previously dumped...
Now i searched samp wiki and found nothing except for ResetPlayerWeapons();... my only idea is to do this:
---
Create a function like "RemoveWeapon(playerid, gunid)"; then in the funciton make it so that it uses GetPlayerWeaponData (or w/e its called) and gets all the guns ur holding... then stores thme in variable and then removes all guns and replaces the ones you already had...
---
This would work, im 99.9% sure of that, although is there already a function like this already made somewhere on the forums ?? (If not, i will make it and probably release it)
-thanks
Re: How to remove a players weapon? -
dLu - 24.10.2010
I found something, using the search function.
Maybe this will help you
http://forum.sa-mp.com/showthread.ph...emoving+weapon
There are more hits, just type in the search function "removing a weapon"
Good luck.
Re: How to remove a players weapon? -
DarrenReeder - 24.10.2010
Everytime i search, it just shows me a load of random threads.. and its the same ones every time.. iswear..
but thankyou
Re: How to remove a players weapon? -
Libra_PL - 24.10.2010
ResetPlayerWeaponsEx?