SA-MP Forums Archive
[FilterScript] Easy AFK/BRB - 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] Easy AFK/BRB (/showthread.php?tid=345647)

Pages: 1 2


Easy AFK/BRB - Kathleen - 25.05.2012

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;
}



Re: Easy AFK/BRB - irfu - 26.05.2012

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


Re: Easy AFK/BRB - Kathleen - 26.05.2012

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;
}



Re: Easy AFK/BRB - Tuntun - 26.05.2012

Can you add /afk Reason & Back for /afk??


Re: Easy AFK/BRB - Kathleen - 26.05.2012

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;
}



Re: Easy AFK/BRB - x96664 - 26.05.2012

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].


Re: Easy AFK/BRB - Kathleen - 26.05.2012

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;
}



Re: Easy AFK/BRB - Tuntun - 26.05.2012

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


Re: Easy AFK/BRB - Kathleen - 26.05.2012

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)


Re: Easy AFK/BRB - KINGINA - 26.05.2012

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!


Re: Easy AFK/BRB - Kathleen - 26.05.2012

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


Re: Easy AFK/BRB - Kathleen - 27.05.2012

BUMP ;'d


Re: Easy AFK/BRB - Private200 - 27.05.2012

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!!


Re: Easy AFK/BRB - S_ILYa™ - 28.05.2012

As easy as abcd...But good effort !


Re: Easy AFK/BRB - sienal - 28.05.2012

Nice work


Re: Easy AFK/BRB - FearLe$$ - 28.05.2012

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


Re: Easy AFK/BRB - Kathleen - 28.05.2012

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


Re: Easy AFK/BRB - faff - 28.05.2012

Nice! rep+


Re: Easy AFK/BRB - Tuntun - 14.06.2012

i will test this..


Re: Easy AFK/BRB - Robert West - 16.07.2012

Nice work