ham_give_weapon and ham_strip_weapon
Code:
There is an alternative function to strip a user's weapon by ConnorMcLeod posted here: http://forums.alliedmods.net/showpos...7&postcount=42 The differences between my function and his are explained by him here: http://forums.alliedmods.net/showpos...1&postcount=44 |
Re: ham_give_weapon and ham_strip_weapon
I think some mods don't have weapons with "weapon_" as the first 7 characters. Other than that, those look like some sweet functions.
|
Re: ham_give_weapon and ham_strip_weapon
now your just bragging Ava ;)
|
Re: ham_give_weapon and ham_strip_weapon
Quote:
|
Re: ham_give_weapon and ham_strip_weapon
Personally I've found the best universal way to get a weapon for any mod is with this: http://forums.alliedmods.net/showthr...ght=amx_msglog
It's not as great as giving the actual name and all and you have to use something like this: new ammo, clip, weapon = get_user_weapon(id,clip,ammo); if( (weapon == 20) , but it's still effective |
Re: ham_give_weapon and ham_strip_weapon
Sorry, but this thread is not about getting a weapon. It's actually for a new way to give and remove weapons from players.
|
Re: ham_give_weapon and ham_strip_weapon
I was referring to stupok's comment that not all mods preceed their weapons with weapon_, wpn_, or CSW_ which is important for having a universal way of getting/checking the weapon before giving/stripping.
|
Re: ham_give_weapon and ham_strip_weapon
there is always room for scolding :P
|
Re: ham_give_weapon and ham_strip_weapon
Note that bpammo needs to be reset for nades/c4.
|
Re: ham_give_weapon and ham_strip_weapon
Must have fakemeta and hamsandwich! And this is a stock! All you need tot do is to copy ham_give_weapon() or ham_strip_weapon() once in you'r plugin and use it:
Code:
ham_give_weapon(id, "weapon_ak47"); |
All times are GMT -4. The time now is 11:53. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.