[Pedido] Include detectar ESC/PAUSE
#1

Eu tinha uma include que detectava de ESC/PAUSE, mas formatei o PC eu esqueci de fazer backup
Fui pegar ela aqui no forumsamp e o link do pastebin tava off...

Alguйm tem isso aн?

Todas que eu acho aqui agora sгo de tempo parado, naquela include assim que dava esc jб detectava...
Reply
#2

http://www.mediafire.com/file/6omras...layerPause.inc
Reply
#3

Nгo tem como postar em
https://hastebin.com/ ~ https://pastebin.com/

Nгo?
Reply
#4

Pra fazer essa funзгo, й sу vocк verificar se a callback OnPlayerUpdate estб sendo chamada.
Se nгo estб, o jogador estб de esc.
Reply
#5

Quote:
Originally Posted by idegod
View Post
Nгo tem como postar em
https://hastebin.com/ ~ https://pastebin.com/

Nгo?
https://hastebin.com/docodefuwo.cpp
Reply
#6

Quote:
Originally Posted by CaioTJF
View Post
Pra fazer essa funзгo, й sу vocк verificar se a callback OnPlayerUpdate estб sendo chamada.
Se nгo estб, o jogador estб de esc.
Obrigado, nгo sabia disso!
Reply
#7

http://forum.sa-mp.com/showpost.php?...71&postcount=7
Reply
#8

Й bem mas fбcil utilizar este mйtodo, uso no meu gamemode.

PHP Code:
new AFKTime[MAX_PLAYERS];
CMD:pausados(playerid)
{
    new 
String[32], String2[128];
    
    
strcat(String2"ID\tNick\n");
    for(new 
iGetPlayerPoolSize(); <= ji++)
    {
        if(!
IsPlayerConnected(i))
                continue;
        
//Modo de verificaзгo
        
if(gettime() - AFKTime[i] > 3//3 segundos sem resposta.
        
{
            
format(String,sizeof(String),"%d\t%s\n"iGetName(i));
            
strcat(String2String);
        }
    }
    
ShowPlayerDialog(playerid1010DIALOG_STYLE_TABLIST_HEADERS"Jogadores Ausente"String2"Fechar""");
    return 
1;
}
public 
OnPlayerUpdate(playerid)
{
    
AFKTime[playerid] = gettime();
    return 
1;
}
GetName(playerID)
{
    new 
n_ome[MAX_PLAYER_NAME];
    
GetPlayerName(playerIDn_omesizeof n_ome);
    return 
n_ome;

Reply
#9

@retirado
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)