[FilterScript] Mgd-AFK System
#1

Mgd-AFK System
What is that System ?
When you type /afk you will be afk , like freeze
also you can type /back to unfreeze your self

pawn Код:
//made by mgd
#include <a_samp>  
#include <zcmd>    

new IsAfk[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    IsAfk[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    IsAfk[playerid] = 0;
    return 1;
}


CMD:afk(playerid,params[])
{
    new string[128], pName[MAX_PLAYER_NAME];
    if(IsAfk[playerid] == 1) return SendClientMessage(playerid, 0xFF0000FF,"You Are Already AFK");
    TogglePlayerControllable(playerid, 0);
    format(string,sizeof(string),"Server: %s Is Now Afk", pName);
    SendClientMessageToAll(0xFFFF00,string);
    SendClientMessage(playerid, 0xFF00FFFF,"Type /back if you want to continue");
    IsAfk[playerid] = 1;
    return 1;
}

CMD:back(playerid,params[])
{
    new string[128], pName[MAX_PLAYER_NAME];
    if(IsAfk[playerid] == 0) return SendClientMessage(playerid, 0xFF0000FF,"You Are Not AFK");
    TogglePlayerControllable(playerid, 1);
    format(string,sizeof(string),"Server: %s Is Back!", pName);
    SendClientMessageToAll(0xFFFF00,string);
    IsAfk[playerid] = 0;
    return 1;
}
Pastebin
Download
Medirafire Link
Reply
#2

awesome and unique rep+
Reply
#3

Quote:
Originally Posted by king_hual
Посмотреть сообщение
unique
Are you seriously shitting me?
Anyways, good for a first time, if it is, try something different next time!
Reply
#4

Thanks guys
but why rajat ?
why he's shitting you ?
Reply
#5

Statistics

Script line - 42

Textdraws - No

So simple - Yes

Good job for a first script

Quote:
Originally Posted by king_hual
Посмотреть сообщение
awesome and unique rep+
lolheyumadbro? ^.o
Reply
#6

oo there is no thing in what king_hual said xd
anyway thanks guys
Reply
#7

For what sscanf is used here?
Reply
#8

forgot to GetPlayerName )
Reply
#9

Quote:
Originally Posted by Lordz™
Посмотреть сообщение
For what sscanf is used here?
well wasn't know that its not needed because its my 2nd plugin
anyway thanks for the note
edited.
Reply
#10

There's so many AFK Scripts out there, I don't know why people release them anymore.

Anyway I guess it looks like your first script.

Good job.
Reply
#11

Thanks captainjohn
Reply
#12

Cool system afk
Reply
#13

Quote:
Originally Posted by Jear
View Post
Cool system afk
thank you bro
Reply
#14

You like it guys ?
Reply
#15

Common but good job.
Reply
#16

Agreed with Djean, But its a nice script! Good Job!
Reply
#17

Ty Djean and Mcban
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)