AFK system V1 -
knackworst - 13.11.2010
AFK system
Features
- -Command /afk
- -Client message for all wich says: "Name of the person who used /afk" is now away from the keyboard!
- -Client message for the player himself wich says: You are now AFK, type /back to move again!
- -3D text label on the head of the player who used /AFK wich says: "AFK" In the color Yellow
- -Toggeling player controlable, Player cannot move until he types /back
- -Command /back
- -Client message for all wich says: "Name of the person who used /back" is now back
- -Client message for the player himself wich says: Welcome back!
- -3D text label on the head of the player Deleted
- -Toggeling player controlable again, player can move
Future edits will be:
-Auto AFK a player when he presses escape button
-Remove player from vehicle when he types /afk
-Remove player weapons on /afk
-Set player virtaul world on /afk
(very basic features... coming soon)
Credits:
I don't care about credits...
Pastebin:
http://pastebin.com/UYLQwTH6
Download: .amx
http://www.mediafire.com/?ytop8rty49g7ubj
DOwnload: .pwn
http://www.mediafire.com/?bdm8i3r9j91e42g
How to install:
Pastbein way:
-Open a new .pwn file, and replace everything in the new file with everything in the pastebin
-Then, save the file and go to your server.cfg and add: "the file name you gave the AFK system" behindthe filterscripts.
Download way:
- Download both files and put them in your filterscripts folder in your server directory folder
- Add: AFKsystem to your filterscripts line in the server.cfg
Converting into your Game Mode
If you rather put this in your gamemode instead of a new FS, that's possible too!
Here's what to do:
- Open pawno two times
- In one of them you open my new FS, by clicking: open/Filterscripts/afksystem
- In the other pawno you open your GameMode
- Now add :
pawn Code:
#define yellow 0xFFFF00AA
- #define COLOR_YELLOW 0xFFFF00AA
under your other defines in your GM and add:
pawn Code:
new Text3D:label[MAX_PLAYERS];
under your other "new" in your GameMode
- next go to OnPlayerCommandText in your GameMode and und
er:
pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
and right under that in your GM you add this:
pawn Code:
if(strcmp("/afk", cmdtext, true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You are now AFK, type /back to move again!");
TogglePlayerControllable(playerid,0);
label[playerid] = Create3DTextLabel("AFK",yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
new string3[70];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), "%s is now Away from the keyboard!", name);
SendClientMessageToAll(COLOR_YELLOW, string3);
}
if(strcmp("/back", cmdtext, true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "You are now back!");
TogglePlayerControllable(playerid,1);
new string3[70];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), "%s is now Back!", name);
SendClientMessageToAll(COLOR_YELLOW, string3);
Delete3DTextLabel(Text3D:label[playerid]);
return 1;
}
Make sure you add it right under it!
ok, if you have any further questions, feel free to ask ; )
Re: AFK system -
ColdXX - 13.11.2010
Update so the player that is AFK cant talk.
And show a game text to all about who's afk!
Re: AFK system -
Noss* - 13.11.2010
Nice, Downloading now
Re: AFK system -
knackworst - 13.11.2010
Quote:
Originally Posted by ColdXX
Update so the player that is AFK cant talk.
And show a game text to all about who's afk!
|
There already is gametext, but it's not gametext, it's just clientmessage for all, I think gametext will be annoying...
And, I'll try the no talking command...
Re: AFK system -
dark_clown - 13.11.2010
not hard to do
1- tutorial you made is moving object with another tutorial like that is existent
2- there are billions of afk systems
only thing cool is your map
Re: AFK system -
knackworst - 13.11.2010
Quote:
Originally Posted by dark_clown
not hard to do
1- tutorial you made is moving object with another tutorial like that is existent
2- there are billions of afk systems
only thing cool is your map
|
So, if a tutorial is not hard, then you may not post it?
that's just bullshit!
Re: AFK system -
Steven82 - 13.11.2010
Quote:
Originally Posted by ColdXX
Update so the player that is AFK cant talk.
And show a game text to all about who's afk!
|
That would be very fucking annoying.
Quote:
Originally Posted by dark_clown
not hard to do
1- tutorial you made is moving object with another tutorial like that is existent
2- there are billions of afk systems
only thing cool is your map
|
Why do you got to flame him? Is it becuase you have no life and need to sit back and flame other people for fun? Please stop.
1) Who gives a shit, it's a tutorial right that may help someone new. So shutup.
2) There arn't that many AFK systems. So stfu and don't get all pissed that he made it before you did. Or whatever your made about.
Re: AFK system -
dark_clown - 13.11.2010
Quote:
Originally Posted by Steven82
That would be very fucking annoying.
Why do you got to flame him? Is it becuase you have no life and need to sit back and flame other people for fun? Please stop.
1) Who gives a shit, it's a tutorial right that may help someone new. So shutup.
2) There arn't that many AFK systems. So stfu and don't get all pissed that he made it before you did. Or whatever your made about.
|
your a freaking no life do you want me to make a afk system in your front with team viewer?
Re: AFK system -
Rzzr - 13.11.2010
Stop flaming kiddo's, both of you.
Re: AFK system -
oliver12 - 13.11.2010
Nice FS man!Keep up good work.
Re: AFK system -
Aleluja - 13.11.2010
Nice and simple.
Re: AFK system -
Mean - 13.11.2010
Quote:
Originally Posted by ColdXX
Update so the player that is AFK cant talk.
And show a game text to all about who's afk!
|
No, just set virtual world when he goes afk to 1 or 2
Re: AFK system -
Steven82 - 13.11.2010
Quote:
Originally Posted by dark_clown
your a freaking no life do you want me to make a afk system in your front with team viewer?
|
I never said they were hard to make, i just said who cares if more than 1 afk system is made. If it's his first or second release let it go man.
Re: AFK system -
knackworst - 13.11.2010
Quote:
Originally Posted by Steven82
I never said they were hard to make, i just said who cares if more than 1 afk system is made. If it's his first or second release let it go man.
|
yes, it's my first release...
so I may not make any more FS's if there are already alot of them?
I didn't know that :S sorry man...
Re: AFK system -
ColdXX - 19.11.2010
Quote:
Originally Posted by Steven82
That would be very fucking annoying.
|
Umm nah,u can add the TextDraw in the down right corner of ur screen,i edited it with knackworst permision and its working just perfect. :P
Re: AFK system -
knackworst - 19.11.2010
I like ColdXX's edit : P can you send me so I can use myself?
Re: AFK system -
ColdXX - 19.11.2010
Yea sure...
Re: AFK system - Guest3598475934857938411 - 08.12.2010
Ontopic: Nice.
Offtopic: Dark_Clown why don't you read the tutorial if its not hard to make?
Maybe you're just a script copier.
Re: AFK system -
knackworst - 08.12.2010
EDIT
_______________
Made a little tut to set it in your GM
Re: AFK system -
Scenario - 08.12.2010
Quote:
Originally Posted by expertprogrammer
Ontopic: Nice.
Offtopic: Dark_Clown why don't you read the tutorial if its not hard to make?
Maybe you're just a script copier.
|
Uh... He's been banned - why are you still talking to him?