[FilterScript] AFK System -Hashish!
#1

Hey guys Hashish again. not sure if anyone seen my last filterscript but i'm trying to get my name out there so I thought I would make another filterscript this one was quick and simple an AFK system!

PHP Code:
#include <a_samp>
//-Sets players in afk mode to different virtual world until they are /back
#define FILTERSCRIPT
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
"   AFK System by Hashish! Loading....   ");
    print(
"--------------------------------------\n");
    return 
1;
}
#endif
//Away From keyboard System/ ! - Tony
new AFK[MAX_PLAYERS];
new 
sendername[MAX_PLAYER_NAME];
new 
string[256];
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
public OnPlayerConnect(playerid)
{
    
AFK[playerid] = 0;
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
//Back Command
if(strcmp(cmdtext"/back"true) == 0)
    {
        if 
AFK[playerid] == 1)
        {
            new 
str[256];
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(strsizeof(str), "[Info]: %s is back"sendername);
            
SendClientMessageToAll(COLOR_WHITEstr);
            
SetPlayerVirtualWorld(playerid0);
            
AFK[playerid] = 0;
            return 
1;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"You are not AFK! ");
            return 
1;
        }
    }
//AFK Command
if(strcmp(cmdtext"/afk"true) == 0)
    {
        if 
AFK[playerid] == 0)
        {
            new 
str[256];
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
format(strsizeof(str), "[Info]: %s is away from keyboard"sendername);
            
SendClientMessageToAll(COLOR_BRIGHTREDstr);
            
SendClientMessage(playeridCOLOR_WHITE"You are in different virtual world. Type /back to return.");
            
SetPlayerVirtualWorld(playeridGetPlayerVirtualWorld(playerid) + 123);
            
AFK[playerid] = 1;
            return 
1;
        }
        else
        {
            
SendClientMessage(playeridCOLOR_WHITE"You are already in away from keyboard mode. Type /back.");
            return 
1;
        }
    }
return 
0;

If you use it or think I did a good job! +REP thanks guys
Reply
#2

nice.
Reply
#3

Thanks REP+ If you like it I return the favour!
Reply
#4

Good. =D
Reply
#5

Simple but NIce!
Reply
#6

Simple yet efficient - This is great (+REP)
8/10
Reply
#7

Check this post

https://sampforum.blast.hk/showthread.php?pid=1518829#pid1518829
https://sampforum.blast.hk/showthread.php?tid=189884
https://sampforum.blast.hk/showthread.php?tid=354263
https://sampforum.blast.hk/showthread.php?tid=316878

I don't want to paste more threads because I would need to spend all day for this. But i'd like to say.. i'm tired with this.

Topic:
My rate is minus unlimited.
Reply
#8

Quote:
Originally Posted by Riddick94
View Post
Check this post

https://sampforum.blast.hk/showthread.php?pid=1518829#pid1518829
https://sampforum.blast.hk/showthread.php?tid=189884
https://sampforum.blast.hk/showthread.php?tid=354263
https://sampforum.blast.hk/showthread.php?tid=316878

I don't want to paste more threads because I would need to spend all day for this. But i'd like to say.. i'm tired with this.

Topic:
My rate is minus unlimited.
come on bro Im just starting out just basicly showing people I can script trying to grain rep dont be an ass for no reason
Reply
#9

Quote:
Originally Posted by Hashish
View Post
come on bro Im just starting out just basicly showing people I can script trying to grain rep dont be an ass for no reason
YOLO...

Anyways...

THIS IS AWESOME <3

Thank you!
Reply
#10

Quote:
Originally Posted by Hashish
View Post
come on bro Im just starting out just basicly showing people I can script trying to grain rep dont be an ass for no reason
That is sad that you came here only for rep. There's a lot of people that doesn't see anything else. You should save this script only for you and for your subconscious, you can 'script'. But next time you should look on the forum "Is this type of script is already released" because it's annoying when you see again the same script, with the same commands which is useless and just next time do something different, special and release this or not.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)