[Ajuda] Tempo afk em cima do player
#1

Boa noite a todos
estou aqui para pedir ajuda a vocкs
pois estou fazendo um Sistema de AFK, e eu queria que quando o player digita-se /afk ou Ficasse de ESC
queria que aparece-se um
Quote:

SetPlayerChatBubble(playerid, "AFK A %S", COR_VAGOS, 100.0, 100000);
com

to tentando fazer
alguem tem uma ideia ??
queria que ficasse o tanto de tempo que o player ficou afk
Reply
#2

Olhe suas mensagens privadas!
Reply
#3

PHP код:
new bool:AFK[MAX_PLAYERS];
//OnPlayerConnect
AFK[playerid] = false;
//OnPlayerDisconnect
AFK[playerid] = false;
CMD:afk(playerid){
if(!
AFK[playerid]){
SetPlayerChatBubble(playerid"Ausente"0xFFFFFFAA100.0100000);
return 
1;
if(
AFK[playerid]){
SetPlayerChatBubble(playerid"Online"0xFFFFFFAA100.0100000);
return 
1;
}
return 
1;

Reply
#4

Rato22
eu queria tipo com uma Contagem de quanto tempo ele ficou de esc ou /afk
mas obrigado vou usar como base !!
Reply
#5

e so adaptar

Contagem
Код:
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; 
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)