Raised This Month: $ Target: $400
 0% 

Hook player's map exploring ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 10-02-2015 , 18:35   Hook player's map exploring ?
Reply With Quote #1

Before I release my massive mod (which is still about 40% completed and soon I might open a development thread about it..) I must create another sub-plugin in order to exploit an error.
After I complete the plugin I will release it so that it can help everyone who is experiencing the same problem. (Solution to that problem hasn't been published under the relating names for keysearching)

Anyway,
To do that I need to be sure in what is the right forward to use.
I need a function call only when the client is exploring the world i.e move the mouse around, arrow keys, walk/run or anything that changes the view angle for that matter.

Anything even close to that?
Al3 is offline
Send a message via Skype™ to Al3
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-02-2015 , 20:22   Re: Hook player's map exploring ?
Reply With Quote #2

Quote:
Originally Posted by Al3 View Post
To do that I need to be sure in what is the right forward to use.
I need a function call only when the client is exploring the world i.e move the mouse around, arrow keys, walk/run or anything that changes the view angle for that matter.
This is basically always. There is no way to tell the difference between when someone is "playing the game" and "just exploring".
__________________
fysiks is offline
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 10-02-2015 , 20:26   Re: Hook player's map exploring ?
Reply With Quote #3

I have to disagree.
Pretty sure there is a way to determine if the player's view changing keys are in idle or not.
Might be a bit tricky for the mouse direction though.

Or one can use the "detect changes method".
Might not be one forward, could be a functional callback or something...

Last edited by Al3; 10-02-2015 at 20:29.
Al3 is offline
Send a message via Skype™ to Al3
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-02-2015 , 20:34   Re: Hook player's map exploring ?
Reply With Quote #4

So you just want to know if they are idle or not? You can check the commands that they are using in client_command() using pev_button (or something like that, IIRC). See hlsdk_const.inc.

Alternatively, you can simply check their position/angles and see if they change.

Regardless, your request really doesn't make sense. You should explain better what exactly you are trying to "hook".
__________________

Last edited by fysiks; 10-02-2015 at 20:37.
fysiks is offline
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 10-02-2015 , 20:43   Re: Hook player's map exploring ?
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
So you just want to know if they are idle or not? You can check the commands that they are using in client_command() using pev_button (or something like that, IIRC). See hlsdk_const.inc.

Alternatively, you can simply check their position/angles and see if they change.

Regardless, your request really doesn't make sense. You should explain better what exactly you are trying to "hook".
All right. I was trying to explain with my best.

I am trying to call a function only when the client changes the view (view angle (mouse) / xyz position). All part of the coordinate system.
I seriously don't know how to make it any clearer O_O

Last edited by Al3; 10-02-2015 at 20:44.
Al3 is offline
Send a message via Skype™ to Al3
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-02-2015 , 20:49   Re: Hook player's map exploring ?
Reply With Quote #6

Quote:
Originally Posted by Al3 View Post
All right. I was trying to explain with my best.

I am trying to call a function only when the client changes the view (view angle (mouse) / xyz position). All part of the coordinate system.
I seriously don't know how to make it any clearer O_O
Yeah, but that is basically ALWAYS when someone is not idle. You can do it by monitoring the position and view angles as I already said but regardless, the function is going to be called ALL THE TIME. If it's not trivial code, this could easily cause lag.

There's got to be a more specific event that you can hook. But, we can't really help you with that since you don't want to be any more specific about what you are actually trying to do.
__________________

Last edited by fysiks; 10-02-2015 at 20:50.
fysiks is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 10-02-2015 , 20:27   Re: Hook player's map exploring ?
Reply With Quote #7

Maybe by giving the option to player?

When the choose to explore, then something will be applied to them such as they can shoot anyone or the player will be invisible to player that choose to play.

When he want to play, then he need to open certain menu and choose to play.
zmd94 is offline
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 10-02-2015 , 20:35   Re: Hook player's map exploring ?
Reply With Quote #8

The function must be called when the player changes the view.
This is for optimization purposes.

The other solution is using a task, but that would be very slow, unneeded and not very promising for a plug-in designed to optimize.
It would ruin more than optimize.

Last edited by Al3; 10-02-2015 at 20:35.
Al3 is offline
Send a message via Skype™ to Al3
Old 10-03-2015, 10:11
HamletEagle
This message has been deleted by HamletEagle.
Al3
Member
Join Date: Sep 2015
Location: Bulgaria
Old 10-02-2015 , 20:36   Re: Hook player's map exploring ?
Reply With Quote #10

Checking if the player is in idle is very close to what I want as most of the actions do require change in the view.
I am not sure of how to do that though.
(I am not much familiar with pev and what it actually means/does.)

And there are some actions that don't need the function to be activated such as
weapon switch, fire, crouch (which will change the meridian, but that could be forgiven) etc.

Last edited by Al3; 10-02-2015 at 20:39.
Al3 is offline
Send a message via Skype™ to Al3
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 22:17.


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