|
SetPlayerChatBubble(playerid, "AFK A %S", COR_VAGOS, 100.0, 100000); com |
new bool:AFK[MAX_PLAYERS];
//OnPlayerConnect
AFK[playerid] = false;
//OnPlayerDisconnect
AFK[playerid] = false;
CMD:afk(playerid){
if(!AFK[playerid]){
SetPlayerChatBubble(playerid, "Ausente", 0xFFFFFFAA, 100.0, 100000);
return 1;
if(AFK[playerid]){
SetPlayerChatBubble(playerid, "Online", 0xFFFFFFAA, 100.0, 100000);
return 1;
}
return 1;
}
new timer, contagem = 15;
public OnPlayerCommandText(playerid,cmdtext)
{
if(!strcmp(cmdtext,"/contagem",true))
{
timer = SetTimer("Contagem",1000,true);
return true;
}
return false;
}
forward Contagem();
public Contagem()
{
contagem--;
if(contagem > 0)
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
new string[30];
format(string,sizeof(string),"%i",contagem);
GameTextForPlayer(i, contagem,1000,0);
}
}
else
{
for(new i = 0, j = GetMaxPlayers(); i != j; i++)
{
GameTextForPlayer(i,"GO",3000,0);
KillTimer(timer);
}
}
return true;
}