AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Properly using fm_strip_user_gun (https://forums.alliedmods.net/showthread.php?t=131670)

GXLZPGX 07-07-2010 14:34

Properly using fm_strip_user_gun
 
I'm using this with the logevent spawned_with_bomb

This is what it says:
fm_strip_user_gun( id, wid, const wpname[]="" )

If the wid of the C4 is 6, and the weapon name is CSW_C4, would it be:

fm_strip_user_gun( id, 6, CSW_C4 )

Or do I only need to use 2 of the 3 arguements

fysiks 07-07-2010 14:59

Re: Properly using fm_strip_user_gun
 
CSW_C4 is an integer and is equal to 6. Weapon name is a string. Probably something like "weapon_gun".

Code:

fm_strip_user_fun(id, CSW_C4)

wrecked_ 07-07-2010 15:46

Re: Properly using fm_strip_user_gun
 
Code:
fm_strip_user_gun( id, CSW_C4, "weapon_c4" )

ConnorMcLeod 07-07-2010 15:52

Re: Properly using fm_strip_user_gun
 
fm_strip_user_gun(id) strips the current weapon from a player.

If you want to remove a specific weapon from him, you have to pass the weapon type OR the weapon name, simple seems to be weapon name :

PHP Code:

fm_strip_user_gun(id, .wname="weapon_c4"

PHP Code:

fm_strip_user_gun(idCSW_C4

PHP Code:

fm_strip_user_gun(id_"weapon_c4"

PHP Code:

fm_strip_user_gun(id0"weapon_c4"

]wrecked_
If you pass weapontype, weaponname is just ignored.


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

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