AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Use Flashlight for use one item (https://forums.alliedmods.net/showthread.php?t=216150)

Jhob94 05-17-2013 09:32

Use Flashlight for use one item
 
Hi iam using this: register_clcmd( "impulse 100", "CmdUseItem" )
For when press f it uses the item. Well that isnt working x)
The problem isnt CmdUseItem because if i use "item" insted of "impulse 100" and then bind f item, it works. So someone have any idea why not working?

YamiKaitou 05-17-2013 10:11

Re: Use Flashlight for use one item
 
register_impulse

ToXedVirus 05-17-2013 10:22

Re: Use Flashlight for use one item
 
100 is the argument.

You have to multiplex the arguments in your code.

Jhob94 05-17-2013 10:43

Re: Use Flashlight for use one item
 
register_impulse("100", "CmdUseItem") ?

Decompiler 05-17-2013 13:15

Re: Use Flashlight for use one item
 
Yep. And I believe you have to include engine for it to work.

ConnorMcLeod 05-17-2013 13:18

Re: Use Flashlight for use one item
 
Quote:

Originally Posted by Jhob94 (Post 1953417)
register_impulse(100, "CmdUseItem") ?

Fixed, arg is integer, not string.

Jhob94 05-17-2013 14:23

Re: Use Flashlight for use one item
 
Quote:

Originally Posted by ConnorMcLeod (Post 1953502)
Fixed, arg is integer, not string.

Thanks :)
Anyway flashlight is only impulse 100 or it works with any other value?
Because if people can use other value for flashlight, i might modify it for all values :3


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

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