Simple AFK Script - Perfect For New Scripters v1.2 -
NoahF - 24.08.2012
Hey guys.
I have made a very simple AFK script that is very easy to use, and is perfect for beginning scripters. I have explained everything in the code in comments so that new scripters know exactly what each part does.
What it does is, when a player types /afk, it will freeze them making it so they can't move and it will send a message to all players saying "So & So has gone AFK." When the player types /back it will unfreeze them and then send another message to all the players saying "So & So is now back from being AFK." There is a feature that makes it so people can't spam the /afk and /back commands. I hope you enjoy! Feel free to post constructive criticism in the replies to this topic so I can make the script better! Also, please don't remove the credits!
COMMANDS:
/afk
/back
/afklist
NOTE:
This FilterScript
HAS been tested by me and works perfectly.
v1.0 Pastebin:
http://pastebin.com/rYSz3esY
v1.0 Download:
http://www.mediafire.com/?58w25dyc9az6o9u
v1.1 Pastebin:
http://pastebin.com/m2dmikFx
v1.1 Download:
http://www.mediafire.com/?yi7jrojilcc9xaj
v1.2 Pastebin:
http://pastebin.com/YLDWQYn3
v1.2 Download:
http://www.mediafire.com/?etrej8ctet38pnf
v1.1 CHANGE-LOG:- Added an AFK List command.
v1.2 CHANGE-LOG:- Added some embedded colors.
- Fixed some indentation issues.
- Added so when a player tries to talk, while AFK, they get a message saying they cannot talk, and their message won't be sent.
- Made it so the AFK Variable is set to 0 when the player disconnects.
- Pruned the script.
CREDITS:
Zeex for the zCmd include.
Thanks iGetty for a little help
Re: Simple AFK Script - Perfect For New Scripters -
iGetty - 24.08.2012
Nice for your first release.
Thanks for crediting me :3
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 24.08.2012
Quote:
Originally Posted by iGetty
Nice for your first release.
Thanks for crediting me :3
|
Haha, you deserve it! ._.
Re: Simple AFK Script - Perfect For New Scripters -
Max_Coldheart - 24.08.2012
There's a mistake in your code.
pawn Code:
TogglePlayerControllable(playerid, 1); //Makes the player not controllable on the /afk command.
Because setting this to true (1) will allow the player to control the character, and this is under /afk command. Fix this please, and it'll be just fine, like every other AFK script.
Re: Simple AFK Script - Perfect For New Scripters -
[MWR]Blood - 24.08.2012
Awww, and then you call it perfect.
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 24.08.2012
Quote:
Originally Posted by Max_Coldheart
There's a mistake in your code.
pawn Code:
TogglePlayerControllable(playerid, 1); //Makes the player not controllable on the /afk command.
Because setting this to true (1) will allow the player to control the character, and this is under /afk command. Fix this please, and it'll be just fine, like every other AFK scripts.
|
Thanks for pointing this out! :P
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 30.08.2012
bump
Re: Simple AFK Script - Perfect For New Scripters -
Johnson_Brooks - 30.08.2012
Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 30.08.2012
Quote:
Originally Posted by Johnson_Brooks
Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
|
OK thanks :P
Re: Simple AFK Script - Perfect For New Scripters -
Johnson_Brooks - 30.08.2012
Suggestion: add /afklist.
If you know how to script you'll make an /afklist :P
Re: Simple AFK Script - Perfect For New Scripters -
Lordzy - 31.08.2012
Afk again.
OMG!
Afk has returned.
OT:Not bad,nice.
But create some differences.
Add some more features.
Re: Simple AFK Script - Perfect For New Scripters -
MrLazyAss - 31.08.2012
Not bad , alot of AFK scripts though it's very usefull 7/10

nice work
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 31.08.2012
Quote:
Originally Posted by Johnson_Brooks
Suggestion: add /afklist.
If you know how to script you'll make an /afklist :P
|
I'll add it soon
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 03.09.2012
A /AFKLIST HAS BEEN ADDED
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 08.09.2012
Bump bump bump it up
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 21.09.2012
v1.2 IS HERE! CHECK THE CHANGE-LOG FOR ALL THE COOL NEW STUFF!
Re: Simple AFK Script - Perfect For New Scripters -
M3mPHi$_S3 - 21.09.2012
OFF-TOPI :
Quote:
Originally Posted by Johnson_Brooks
Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
|
Bumping after 48 is in the case you whould be assking for hlep bumping your thread to make it top list is not allowed :
On-TOPIC : Not badkeep up :
Re: Simple AFK Script - Perfect For New Scripters -
M3mPHi$_S3 - 21.09.2012
OFF-TOPI :
Quote:
Originally Posted by Johnson_Brooks
Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
|
Bumping after 48 is in the case you whould be assking for hlep bumping your thread to make it top list is not allowed :
On-TOPIC : Not bad keep up :
Quote:
Originally Posted by NoahF
Bump bump bump it up
|
OMG 4 time Bumping in 1 page :
Re: Simple AFK Script - Perfect For New Scripters -
jpeg - 21.09.2012
not bad, good work.
Re: Simple AFK Script - Perfect For New Scripters -
NoahF - 22.09.2012
Quote:
Originally Posted by jpeg
not bad, good work.
|
Thanks jpeg!