26.05.2012, 13:27
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];
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;
}