SA-MP Forums Archive
[FilterScript] Simple AFK System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple AFK System (/showthread.php?tid=234942)

Pages: 1 2


Simple AFK System - Markx - 04.03.2011

Simple AFK System

By: [KMA]Markx
About:
[U]Commands[/U]

/afk
/back
More info

It got a anti spam system.
Very useful.
Player Cant talk while thair AFK.
English FileScript

Images





Credits
Zeex for Zcmd

#Note
You will need Zcmd inc in your includes folder!

Instalation

1.Put AFK.pwn in your FileScript Folder.
2.Download Zeex's Zcmd include.
3.Open server.cfg and add AFK to Filescript line.
4.Enjoy!


Download

SolidFiles
Pastebin



Re: Simple AFK System - Ironboy - 04.03.2011

good job


Re: Simple AFK System - Markx - 04.03.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
good job
Thanks! Its my First FS


Re: Simple AFK System - Ironboy - 04.03.2011

Nice starting xD


Re: Simple AFK System - Markx - 04.03.2011

Quote:
Originally Posted by Ironboy
Посмотреть сообщение
Nice starting xD
Wow thanks, i didnt think that i will do that good :P i ain't very good at scripting

EDIT: Added Credits, #Note and Installation to the main post


Re: Simple AFK System - Mean - 04.03.2011

It's good, but someone should make a system that would kick afk players.


Re: Simple AFK System - Master_Gangster - 04.03.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
It's good, but someone should make a system that would kick afk players.
actually it's quite easy.

use this script for example and find where the afk command is, then just add a simple kick. After detecting IF the player is really afk.

take into account this code can be changed to kick the player if they are afk:
Код:
if (IsPlayerAfk[playerid] == 1) 
{
    Kick(playerid); //kick the player
}
maybe an opinion?


Re: Simple AFK System - sherlock - 04.03.2011

Quote:
Originally Posted by [KMA]Lord_Deji
Посмотреть сообщение
how about you make like a tree...
"AND GET OUTTA HERE! Its LEAVE! Maake like a tree,and LEAVE. You sound like a dam fool when you say it wrong!" Sorry,couldnt resist :P Back to the future part 2 xD. ..... Anyway i agree.Its his first script and it looks cool. I think for a next version you can make it freeze the player too? Then i will be using it :P


Re: Simple AFK System - Master_Gangster - 04.03.2011

Quote:
Originally Posted by sherlock
Посмотреть сообщение
"AND GET OUTTA HERE! Its LEAVE! Maake like a tree,and LEAVE. You sound like a dam fool when you say it wrong!" Sorry,couldnt resist :P Back to the future part 2 xD. ..... Anyway i agree.Its his first script and it looks cool. I think for a next version you can make it freeze the player too? Then i will be using it :P
for that you can simply use
Код:
TogglePlayerControllable(playerid, 0);
somewhere in your code bro (:


Respuesta: Simple AFK System - Jovanny - 05.03.2011

good job


Re: Simple AFK System - Markx - 05.03.2011

Thanks all

-How about to attach a 3D text over the head and set the health to 10000 + freeze him?


Re: Simple AFK System - bestr32 - 05.03.2011

xD.

find public OnPlayerCommandText
And do this: (pss: you can just copy paste it) :P

Код:
if(strcmp(cmdtext, "/afk", true) == 0)
	{
		TogglePlayerControllable(playerid, 0);
		new string [128];
		new pName[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, pName, sizeof(pName));
    	format(string,sizeof string,"%s is afk now (Away From Keyboard).",pName);
    	SendClientMessageToAll(green, string);
    	return 1;
    }
Код:
if(strcmp(cmdtext, "/back", true) == 0)
    {
   		new string [128];
		new pName[MAX_PLAYER_NAME];
    	GetPlayerName(playerid, pName, sizeof(pName));
    	format(string,sizeof string,"%s is back now (Back To KeyBoard).",pName);
    	SendClientMessageToAll(lightblue, string);
        TogglePlayerControllable(playerid, 1);
		return 1;
	}
At the top of the script:

#define lightblue 0x00FFFFFF
#define green 0x00FF00FF


Re: Simple AFK System - bestr32 - 05.03.2011

There u go a simple afk system.


Re: Simple AFK System - Markx - 05.03.2011

Yes, and you can spam with it...


Re: Simple AFK System - Shubham - 07.03.2011

Good work.


Re: Simple AFK System - Markx - 07.03.2011

Quote:
Originally Posted by Shubham
Посмотреть сообщение
Good work.
Thanks Shub


Re: Simple AFK System - Davz*|*Criss - 07.03.2011

Cool


Re: Simple AFK System - Markx - 07.03.2011

Quote:
Originally Posted by Davz*|*Criss
Посмотреть сообщение
Cool
Thanks!


Re: Simple AFK System - yourdeathisnear - 08.03.2011

awsome dude
nice mod


Re: Simple AFK System - Markx - 08.03.2011

Quote:
Originally Posted by yourdeathisnear
Посмотреть сообщение
awsome dude
nice mod
Thanks