Raised This Month: $ Target: $400
 0% 

Check weapon name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 19:03   Check weapon name
Reply With Quote #1

I want to remove the weapon that the person is holding. So how would i go about doing that....

As of right now im using strip_users_weapons from the fun module

Then giving them a knife.


but would rather just strip the first weapon.

Last edited by Doc-Holiday; 11-01-2009 at 21:18.
Doc-Holiday is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-01-2009 , 21:30   Re: Check weapon name
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?t=56377
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 22:20   Re: Check weapon name
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post

Yea.... dosent work for what im trying to do...

even let it use csw

but it dosent allow me to do like

new weapon = cs_get_user_weaponid(ent)

if(weapon == gMyWeapon[sizeof gMyWeapon])
{
ham_strip_weapon(id, weapon)
}
Doc-Holiday is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-01-2009 , 22:48   Re: Check weapon name
Reply With Quote #4

huh?

Code:
gMyWeapon[sizeof gMyWeapon]

index out of bounds

ham_strip_weapon takes a string ("weapon_weaponname")
__________________
fysiks is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 11-01-2009 , 23:02   Re: Check weapon name
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
huh?

Code:
gMyWeapon[sizeof gMyWeapon]

index out of bounds

ham_strip_weapon takes a string ("weapon_weaponname")

Right and all the return names get

csw_awp

not

weapon_awp

Its all good i think ill just keep it striping all weps.... and give knife
Doc-Holiday is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-01-2009 , 23:17   Re: Check weapon name
Reply With Quote #6

http://www.amxmodx.org/funcwiki.php?...name&go=search

Code:
new szWeapon[ 32 ]; get_weaponname( get_user_weapon( id ), szWeapon, 31 ); ham_strip_weapon( id, szWeapon );
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode