24.10.2010, 13:28
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
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