19.01.2013, 10:55
(
Последний раз редактировалось mgd; 19.01.2013 в 12:22.
)
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;
}
Download
Medirafire Link