SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 25/05/2012, 09:13 PM   #1
Kathleen
Huge Clucker
 
Join Date: May 2012
Location: Netherland
Posts: 210
Reputation: 18
Default Easy AFK/BRB

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;
}
Kathleen is offline   Reply With Quote
Old 26/05/2012, 04:40 AM   #2
irfu
Big Clucker
 
irfu's Avatar
 
Join Date: Feb 2012
Location: India
Posts: 87
Reputation: 15
Default Re: Easy AFK/BRB

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


TyRanX GaminG

IP : 94.249.206.118:7777
Website : www.tyranx.in
Forum : www.tyranx.smffy.com

My works

[FS]Radio system
[FS] I Registration System
[FS] I Admin System

LEFT SA-MP
irfu is offline   Reply With Quote
Old 26/05/2012, 08:22 AM   #3
Kathleen
Huge Clucker
 
Join Date: May 2012
Location: Netherland
Posts: 210
Reputation: 18
Default Re: Easy AFK/BRB

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

Last edited by Kathleen; 26/05/2012 at 08:23 AM. Reason: Adding Text
Kathleen is offline   Reply With Quote
Old 26/05/2012, 08:29 AM   #4
Tuntun
High-roller
 
Tuntun's Avatar
 
Join Date: May 2012
Posts: 1,565
Reputation: 61
Default Re: Easy AFK/BRB

Can you add /afk Reason & Back for /afk??
__________________
Are you an aviation fan? to get more aviation photo like:
https://www.facebook.com/profile.php?id=657212634354407
Tuntun is offline   Reply With Quote
Old 26/05/2012, 10:21 AM   #5
Kathleen
Huge Clucker
 
Join Date: May 2012
Location: Netherland
Posts: 210
Reputation: 18
Default Re: Easy AFK/BRB

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;
}
__________________
dsd
Kathleen is offline   Reply With Quote
Old 26/05/2012, 12:34 PM   #6
x96664
Gangsta
 
x96664's Avatar
 
Join Date: Jun 2009
Posts: 615
Reputation: 3
Default Re: Easy AFK/BRB

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].
x96664 is offline   Reply With Quote
Old 26/05/2012, 01:27 PM   #7
Kathleen
Huge Clucker
 
Join Date: May 2012
Location: Netherland
Posts: 210
Reputation: 18
Default Re: Easy AFK/BRB

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;
}
__________________
dsd
Kathleen is offline   Reply With Quote
Old 26/05/2012, 05:25 PM   #8
Tuntun
High-roller
 
Tuntun's Avatar
 
Join Date: May 2012
Posts: 1,565
Reputation: 61
Default Re: Easy AFK/BRB

Can you help me with add there /afklist.. Cmd... for see Who is afk?
__________________
Are you an aviation fan? to get more aviation photo like:
https://www.facebook.com/profile.php?id=657212634354407
Tuntun is offline   Reply With Quote
Old 26/05/2012, 07:10 PM   #9
Kathleen
Huge Clucker
 
Join Date: May 2012
Location: Netherland
Posts: 210
Reputation: 18
Default Re: Easy AFK/BRB

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)
__________________
dsd
Kathleen is offline   Reply With Quote
Old 26/05/2012, 07:37 PM   #10
KINGINA
Big Clucker
 
KINGINA's Avatar
 
Join Date: Sep 2011
Location: Where I m???
Posts: 166
Reputation: 12
Default Re: Easy AFK/BRB

excuse me! Look mine: http://forum.sa-mp.com/showthread.php?t=332879
Same system and you have just remove (/AFK) take a look on mine! and i was firs upload it!
KINGINA is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy help for VIP Dainyzxz Help Archive 8 07/01/2011 11:41 PM
Very easy! Daniel_June Help Archive 4 05/02/2010 08:16 PM
Easy help.. anyone? Shellegg Help Archive 4 19/03/2009 12:12 AM
Very easy but i don't know :S harrold Help Archive 10 27/02/2009 09:35 PM


All times are GMT. The time now is 05:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.