Diddl3s

How to test if player had not moved in 10 minutes?

2 posts in this topic

Hello,

 

Is it possible to test if a player has not moved in say 10 Minutes?

 

Something similar to the following, but obviously correct :)

 if (movement player > 600 )  exitwith {};

 

Thanks for any help !

Share this post


Link to post
Share on other sites

You'd need to have some sort of initial check, then sleep for 10min, then another check. Seems like you could do something like

_initialPlayerPos = getPosATL player; // Initial player position
uiSleep 600; // 10 minutes
if !(((getPosATL player) distance _initialPlayerPos) > 0) then
{
	diag_log "player has not moved in any direction for 10 minutes";
};

You'd want to spawn that and not call however, since the sleep will stop anything from executing that follows it.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.