AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [SOLVED] Function client_impulse (https://forums.alliedmods.net/showthread.php?t=140338)

GalegO 10-10-2010 22:23

[SOLVED] Function client_impulse
 
What the purpose of the function client_impulse?

I don't understand that: http://www.amxmodx.org/funcwiki.php?...ulse&go=search

And I did not find any documentation talking about it :(

Thanks for help...

EDIT: Thanks guys I understand :)

ARES[ro] 10-10-2010 23:25

Re: Function client_impulse
 
Its a forward for when player types in console "impulse <number>"
Like for example flashlight.I know theres some impulse for nightvision idk how does this optimise the game engine by having impulses but it has its purpouse and with that forward u can hook them.
You can hook ur own impulse numbers there so say if a player enters impulse 1337 he gets 100% hp back u can do that like this:
PHP Code:

public client_impulse idimpulse )
{
    switch(
impulse)
    {
        case 
1337set_user_health(id100.0);
        case default: return 
PLUGIN_HANDLED;
    }


:mrgreen:

GalegO 10-10-2010 23:40

Re: Function client_impulse
 
Thanks now I understand :D

nikhilgupta345 10-10-2010 23:45

Re: Function client_impulse
 
Just FYI: I think flashlight using is impulse 100, which is probably what most people use this to detect. :)

GalegO 10-10-2010 23:53

Re: Function client_impulse
 
Yes, that's right! I don't use this command, but talk with my friend now, and he confirmed this "feature"

fysiks 10-11-2010 00:24

Re: Function client_impulse
 
impulse 201 is a spray decal (in DOD).

Mxnn 10-11-2010 14:24

Re: Function client_impulse
 
Quote:

Originally Posted by fysiks (Post 1321772)
impulse 201 is a spray decal (in DOD).

In CS too.

Hunter-Digital 10-12-2010 05:40

Re: Function client_impulse
 
"impulse 201" is in any HL mod (including HL) that supports spraypaints, unless it's altered to use a different command.

fysiks 10-12-2010 19:49

Re: Function client_impulse
 
Quote:

Originally Posted by Hunter-Digital (Post 1322764)
"impulse 201" is in any HL mod (including HL) that supports spraypaints, unless it's altered to use a different command.

Good to know. As I don't play those other games I was not entirely sure :).

ConnorMcLeod 10-13-2010 01:47

Re: Function client_impulse
 
Better to use register_impulse.


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

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