[FilterScript] Simple AFK System
#1

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
Reply
#2

good job
Reply
#3

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

Nice starting xD
Reply
#5

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
Reply
#6

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

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?
Reply
#8

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
Reply
#9

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 (:
Reply
#10

good job
Reply
#11

Thanks all

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

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
Reply
#13

There u go a simple afk system.
Reply
#14

Yes, and you can spam with it...
Reply
#15

Good work.
Reply
#16

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

Cool
Reply
#18

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

awsome dude
nice mod
Reply
#20

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


Forum Jump:


Users browsing this thread: 1 Guest(s)