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