[FilterScript] AFK system ( little diffrent than other systems, detecting possible AFK players )
#1

Hello there, I realased a filterscript lulz.

What does it do?
If a player is not moving for 30 seconds, it will send a message to RCON admins that a player might be AFK. You can change it so it doesn't send to RCON admins, but to your own admin system.

Any screenshots?


Download:
Click here for Mean's AFK system.
Reply
#2

Well, in my opinion, another one.
Reply
#3

Yes, but everyone is putting the /afk & /back commands. I've decided to detect possible AFK players.
I know, there are more efficient methods to do this, but I think this one is the most lag-free.
Reply
#4

Well, i still personally think ''Another one''.
But i forgot to say this has more options. So i didn't say it wasn't bad, so its good.

But, still another one
Nice.
Reply
#5

LoL. Thank you.
Reply
#6

to make it kick the player due to 30 seconds of inactivity do something like this:

Код:
#include < a_samp >
#include < a_npc >
#include < foreach >

#define RED 0xE60000FF

new Float:x, Float:y, Float:z;
new Float:x2, Float:y2, Float:z2;

public OnPlayerConnect( playerid )
{
	SetTimerEx( "CheckForAfk", 30000, 1, "i", playerid );
	return 1;
}

forward CheckForAfk( playerid );
public CheckForAfk( playerid )
{
	GetPlayerPos( playerid, x, y, z );
	if( x == x2 && y == y2 && z == z2 )
	{
		foreach(Player, i) if(!IsPlayerNPC(i))
		{
		   SendClientMessage(i, RED, "You have been kicked due to massive inactivity.");
		   Kick(i);
		}
	}
	GetPlayerPos( playerid, x2, y2, z2 );
	return 1;
}
BTW I used "foreach" in this since I find it ALOT faster than the normal usage.
Reply
#7

How can 30 seconds of AFK can be massive :O
Reply
#8

Quote:
Originally Posted by Master_Gangster
Посмотреть сообщение
to make it kick the player due to 30 seconds of inactivity do something like this:

Код:
#include < a_samp >
#include < a_npc >
#include < foreach >

#define RED 0xE60000FF

new Float:x, Float:y, Float:z;
new Float:x2, Float:y2, Float:z2;

public OnPlayerConnect( playerid )
{
	SetTimerEx( "CheckForAfk", 30000, 1, "i", playerid );
	return 1;
}

forward CheckForAfk( playerid );
public CheckForAfk( playerid )
{
	GetPlayerPos( playerid, x, y, z );
	if( x == x2 && y == y2 && z == z2 )
	{
		foreach(Player, i) if(!IsPlayerNPC(i))
		{
		   SendClientMessage(i, RED, "You have been kicked due to massive inactivity.");
		   Kick(i);
		}
	}
	GetPlayerPos( playerid, x2, y2, z2 );
	return 1;
}
BTW I used "foreach" in this since I find it ALOT faster than the normal usage.
Why kick the player? Your only goal is to mark those who are AFK, thinking that they might come back and continue playing... It's annoying for them to be kicked 30 seconds after they went AFK...
The whole point of AFK systems is to make them "immune" until they return so they won't lose progress.
Reply
#9

Quote:
Originally Posted by viKKmaN
Посмотреть сообщение
Why kick the player? Your only goal is to mark those who are AFK, thinking that they might come back and continue playing... It's annoying for them to be kicked 30 seconds after they went AFK...
The whole point of AFK systems is to make them "immune" until they return so they won't lose progress.
Not really, they can be kicked for the reason for staying on the server just like that, and making Hours++...
Reply
#10

Quote:
Originally Posted by viKKmaN
Посмотреть сообщение
Why kick the player? Your only goal is to mark those who are AFK, thinking that they might come back and continue playing... It's annoying for them to be kicked 30 seconds after they went AFK...
The whole point of AFK systems is to make them "immune" until they return so they won't lose progress.
*look* a guy from an earlier post just like this one suggested that if it makes it kick the player it would be much better, "FOR HIM" and he said he would like it. SO I simply made it FOR HIM. if anyone else wants to use it, they can.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)