[FilterScript] Simple AFK Script - Perfect For New Scripters
#1

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

Nice for your first release.

Thanks for crediting me :3
Reply
#3

Quote:
Originally Posted by iGetty
View Post
Nice for your first release.

Thanks for crediting me :3
Haha, you deserve it! ._.
Reply
#4

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.
Reply
#5

Awww, and then you call it perfect.
Reply
#6

Quote:
Originally Posted by Max_Coldheart
View Post
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
Reply
#7

bump
Reply
#8

Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
Reply
#9

Quote:
Originally Posted by Johnson_Brooks
View Post
Nice FS.
NOTE: You're allowed to bump after 48 hours of the last reply.
OK thanks :P
Reply
#10

Suggestion: add /afklist.

If you know how to script you'll make an /afklist :P
Reply
#11

Afk again.
OMG!
Afk has returned.

OT:Not bad,nice.
But create some differences.
Add some more features.
Reply
#12

Not bad , alot of AFK scripts though it's very usefull 7/10 nice work
Reply
#13

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

A /AFKLIST HAS BEEN ADDED
Reply
#15

Bump bump bump it up
Reply
#16

v1.2 IS HERE! CHECK THE CHANGE-LOG FOR ALL THE COOL NEW STUFF!
Reply
#17

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 :
Reply
#18

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 :
Reply
#19

not bad, good work.
Reply
#20

Quote:
Originally Posted by jpeg
Посмотреть сообщение
not bad, good work.
Thanks jpeg!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)