SA-MP Forums Archive
[FilterScript] Simple AFK System - [My First Filterscript] - 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 - [My First Filterscript] (/showthread.php?tid=342656)



Simple AFK System - [My First Filterscript] - RedWingz - 14.05.2012

Hey guys,

This took me about 10-15 Minutes to make this filterscript,
But I am a beginner at scripting so It's Very simple.
Hope you guys like it..!


Pastebin: Click here

Regards, RedWingz.


Re: Simple AFK System - [My First Filterscript] - Pinguinn - 14.05.2012

No offence, but its poorly coded (even if you are a beginner at scripting)

pawn Код:
if(strcmp("/afk", cmdtext, true, 10) == 0)
/afk is 4 characters long, not 10.

pawn Код:
if(strcmp("/back", cmdtext, true, 10) == 0)
/back is 5 characters long, not 10.

pawn Код:
SetPlayerHealth(playerid, 100);
What if the player has 10 hp? He uses /back and his health is restored to 100

This type of afk system is released like... 100 times...
Please, at least make it a better AFK system: checking virtual world, checking interior, did the player actually move (GetPlayerPos)?


Re: Simple AFK System - [My First Filterscript] - RedWingz - 14.05.2012

Yea, Well...
Like I said, I'm a beginner scripter.


Re: Simple AFK System - [My First Filterscript] - Dolf - 14.05.2012

What about also letting all the other players know they are afk? that would be usefull and /afklist etc

5/10 for even making it


Re: Simple AFK System - [My First Filterscript] - RedWingz - 14.05.2012

Thanks.


Re: Simple AFK System - [My First Filterscript] - Dolf - 14.05.2012

Try add the /afklist and also try add so when a player says /afk it says "whoever" is now Away from the keyboard!
then when /back "whoever" is now Back!"


Re: Simple AFK System - [My First Filterscript] - HaZaRaS™ - 14.05.2012

Pretty simple but good ! Keep up and try to make more and more useful function in it :


Re: Simple AFK System - [My First Filterscript] - RedWingz - 14.05.2012

Thanks, I'll try better next time.


Re: Simple AFK System - [My First Filterscript] - umarmalik - 14.05.2012

Bro its good for your first script. + rep


Re: Simple AFK System - [My First Filterscript] - RedWingz - 14.05.2012

Thanks. (: