[FilterScript] Easy AFK/BRB
#1

Hello SA-MP Forum Users, ;'d
I made a easy Filterscript...
Also Players can't abuse this script if they typ /afk you still can lose HP when you not tabbed etc,
Just look at the script

Download (AMX+PWN)
http://dl.dropbox.com/u/75302440/AfkBRBFs.rar
http://www.2shared.com/file/nOalz9ew/AfkBRBFs.html

Code:
CMD:afk(playerid, params [])
{
    new string[129], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_WHITE, "You are now AFK.");
    format(string,sizeof string, "%s is now AFK (Away From Keyboard).",pName);
    SendClientMessageToAll(0xFF0000AA,string);
    TogglePlayerControllable(playerid, 0);
    return 1;
}

CMD:brb(playerid, params [])
{
    new string[129], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_WHITE, "You are now BRB.");
    format(string,sizeof string, "%s is now BRB (Be Right Back).",pName);
    SendClientMessageToAll(0xFF0000AA,string);
    TogglePlayerControllable(playerid, 0);
    return 1;
}

CMD:back(playerid, params [])
{
    new string[129], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_WHITE, "You are no longer AFK/BRB.");
    format(string,sizeof string, "%s is no longer AFK/BACK.",pName);
    SendClientMessageToAll(0xFF0000AA,string);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
Reply
#2

can you add a command as /whoisafk to find who is afk?
Reply
#3

When you stand 15 seconds on the same place you stand in the /listafk
This AFK List is based on Godfather, LS RP, NGG
pawn Code:
CMD:listafk(playerid, params[]) {
    if(PlayerInfo[playerid][pAdmin] >= 2) {

        new
            szMessage[36 + MAX_PLAYER_NAME];

        SendClientMessageEx(playerid,COLOR_WHITE,"--[AFK PLAYERS]--");
        foreach(Player, i) if(playerAFK[i] != 0 && playerAFKTime[i] > 15) {
            format(szMessage,sizeof(szMessage),"* %s (ID %d), AFK for %d minutes.", GetPlayerNameEx(i), i, playerAFKTime[i] / 15);
            if(PlayerInfo[i][pAdmin] >= 2) SendClientMessageEx(playerid,COLOR_RED,szMessage);
            else SendClientMessageEx(playerid,COLOR_GREY,szMessage);
        }
    }
    else SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use this command.");
    return 1;
}
Reply
#4

Can you add /afk Reason & Back for /afk??
Reply
#5

Quote:
Originally Posted by Tuntun
View Post
Can you add /afk Reason & Back for /afk??
Sure, Here is the New Code for you bro <3
By the way, If you want i can make it with Label on your head also

pawn Code:
CMD:afk(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /afk [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now AFK Reason: %s.",pName, reason);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}

CMD:brb(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /brb [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now BRB Reason: %s.",pName, reason);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}
Reply
#6

Quote:
Originally Posted by Kathleen
View Post
Sure, Here is the New Code for you bro <3
By the way, If you want i can make it with Label on your head also
It will be nice if you make it, something as [AFK].
Reply
#7

Quote:
Originally Posted by x96664
View Post
It will be nice if you make it, something as [AFK].
Here is the CMD with label "I'm afk/brb" enjoy it, Before you include it,,,
Add this line by your other "NEW" or what else


new Text3D:afkbrb[MAX_PLAYERS];

pawn Code:
CMD:afk(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /afk [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now AFK Reason: %s.",pName, reason);
        LabelOn[playerid] = Create3DTextLabel("I'm AFK (Away From Keyboard)",0xCCCC00FF,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(afkbrb[playerid], playerid, 0.0, 0.0, 0.3);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}

CMD:brb(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /brb [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now BRB Reason: %s.",pName, reason);
        LabelOn[playerid] = Create3DTextLabel("I'm BRB (Be Right Back)",0xCCCC00FF,30.0,40.0,50.0,40.0,0);
        Attach3DTextLabelToPlayer(afkbrb[playerid], playerid, 0.0, 0.0, 0.3);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}

CMD:back(playerid, params [])
{
    new string[129], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_WHITE, "You are no longer AFK/BRB.");
    format(string,sizeof string, "%s is no longer AFK/BACK.",pName);
    SendClientMessageToAll(0xFF0000AA,string);
    Delete3DTextLabel(afkbrb[playerid]);
    TogglePlayerControllable(playerid, 1);
    return 1;
}
Reply
#8

Can you help me with add there /afklist.. Cmd... for see Who is afk?
Reply
#9

Quote:
Originally Posted by Tuntun
View Post
Can you help me with add there /afklist.. Cmd... for see Who is afk?
Sure, Add me on Skype: xifamous
or msn elewoutr@hotmail.com (im not always active on MSN)
Reply
#10

excuse me! Look mine: https://sampforum.blast.hk/showthread.php?tid=332879
Same system and you have just remove (/AFK) take a look on mine! and i was firs upload it!
Reply
#11

Quote:
Originally Posted by KINGINA
Посмотреть сообщение
excuse me! Look mine: https://sampforum.blast.hk/showthread.php?tid=332879
Same system and you have just remove (/AFK) take a look on mine! and i was firs upload it!
Maby it's same defines etc, but i updated my one with reaosn, Label etc
Reply
#12

BUMP ;'d
Reply
#13

Quote:
Originally Posted by KINGINA
Посмотреть сообщение
excuse me! Look mine: https://sampforum.blast.hk/showthread.php?tid=332879
Same system and you have just remove (/AFK) take a look on mine! and i was firs upload it!
You boured me up . If it is afk system , it have the same commands and lines . Please stop spamming about it . Not any afk system is your . And this one know how to scrip , he scripted for all people and realized their dreams ! NOT EVERYTHING IS YOUR!!
Reply
#14

As easy as abcd...But good effort !
Reply
#15

Nice work
Reply
#16

https://sampforum.blast.hk/showthread.php?tid=332879 Cheater
Reply
#17

Quote:
Originally Posted by FearLe$$
Посмотреть сообщение
What Cheater, You newb check my script and his script... my script got a big diffrent, i got /afk reason etc
Reply
#18

Nice! rep+
Reply
#19

i will test this..
Reply
#20

Nice work
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)