How to remove a players weapon?
#1

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
Reply
#2

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.
Reply
#3

Everytime i search, it just shows me a load of random threads.. and its the same ones every time.. iswear..

but thankyou
Reply
#4

ResetPlayerWeaponsEx?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)