AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Check weapon name (https://forums.alliedmods.net/showthread.php?t=108115)

Doc-Holiday 11-01-2009 19:03

Check weapon name
 
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.

Exolent[jNr] 11-01-2009 21:30

Re: Check weapon name
 
http://forums.alliedmods.net/showthread.php?t=56377

Doc-Holiday 11-01-2009 22:20

Re: Check weapon name
 
Quote:

Originally Posted by Exolent[jNr] (Post 978489)


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)
}

fysiks 11-01-2009 22:48

Re: Check weapon name
 
huh?

Code:

gMyWeapon[sizeof gMyWeapon]
:arrow:
index out of bounds

ham_strip_weapon takes a string ("weapon_weaponname")

Doc-Holiday 11-01-2009 23:02

Re: Check weapon name
 
Quote:

Originally Posted by fysiks (Post 978546)
huh?

Code:

gMyWeapon[sizeof gMyWeapon]
:arrow:
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

Exolent[jNr] 11-01-2009 23:17

Re: Check weapon name
 
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 );

Doc-Holiday 11-01-2009 23:40

Re: Check weapon name
 
Solved... Thanks


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

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