Player Inactive !
#1

I would like to know, if there is something that identifies that the player is not moving/driving (inactive).

Like if i dont player for 2 minutes, the server put me in a different world, but automatically. .

Best Regards.
Reply
#2

Search for AFK script and modify it.
Reply
#3

Quote:
Originally Posted by Scott[LT
]
Search for AFK script and modify it.
I dont find what i want, auto AFK system...
Reply
#4

What do you exactly need?
Reply
#5

Quote:
Originally Posted by MenaceX^
What do you exactly need?
Something that identifies that the player is not active.
Like if he does not press any key for 2 minutes, he is inactive.
Reply
#6

get some admins..
Reply
#7

Quote:
Originally Posted by urkiefly101
get some admins..
OMG ..

I need this to stop counting the activity points when the player is inactive ? Do u think i need admins for that ?
Reply
#8

This sounds quiet interest ..
Reply
#9

You could just have a repeating timer every 2 minutes that gets their position and checks if it is the same as when it last checked. Something like this.

pawn Код:
forward InactiveCheck();

new Float:PlayerX[MAX_PLAYERS];
new Float:PlayerY[MAX_PLAYERS];

//OnGameModeInit
SetTimer("InactiveCheck",120000,1);

public InactiveCheck()
{
    new Float:X,Float:Y,Float:Z;
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
            GetPlayerPos(i,X,Y,Z);
            if(X == PlayerX[i] && Y == PlayerY[i])
            {
              //They're inactive
            }
            else
            {
              PlayerX[i] = X;
              PlayerY[i] = Y;
            }
      }
    }
    return 1;
}
No need to see if they're Z is the same as last time. I don't think they will be able to move up and keep the same x,y.
Reply
#10

SetTimer("InactiveCheck",120000,1);

I think this should be on player spawn with:

SetTimerEx("InactiveCheck",120000,1,"i",playerid);

To create a counting for each player. Am i correct ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)