Raised This Month: $ Target: $400
 0% 

Solved Check if player can spray.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-07-2017 , 12:47   Check if player can spray.
Reply With Quote #1

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?

Last edited by eyal282; 04-07-2017 at 14:37.
eyal282 is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 04-07-2017 , 13:43   Re: Check if player can spray.
Reply With Quote #2

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.
klippy is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 04-07-2017 , 14:25   Re: Check if player can spray.
Reply With Quote #3

Quote:
Originally Posted by KliPPy View Post
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

Last edited by eyal282; 04-08-2017 at 09:41.
eyal282 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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