AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Check if player can spray. (https://forums.alliedmods.net/showthread.php?t=295887)

eyal282 04-07-2017 12:47

Check if player can spray.
 
I did register_impulse for 201 and I have no idea how to check whether the player is capable of spraying for any reason ( looking at something or has proper next decal time ).

Any idea how can it be done?

klippy 04-07-2017 13:43

Re: Check if player can spray.
 
This is the exact code the game uses to check if a player can spray: https://mxr.alliedmods.net/hlsdk/sou...layer.cpp#3474

The best way would be to hook CSprayCan::Spawn(). I don't know if it's possible without Orpheu/Okapi because it's not linked to any classname so Hamsandwich can't do it and I don't think there's a way to identify that entity.

eyal282 04-07-2017 14:25

Re: Check if player can spray.
 
Quote:

Originally Posted by KliPPy (Post 2510130)
This is the exact code the game uses to check if a player can spray: https://mxr.alliedmods.net/hlsdk/sou...layer.cpp#3474

The best way would be to hook CSprayCan::Spawn(). I don't know if it's possible without Orpheu/Okapi because it's not linked to any classname so Hamsandwich can't do it and I don't think there's a way to identify that entity.

Solved


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

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