SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 07/05/2017, 02:40 AM   #1
pdonald
Huge Clucker
 
Join Date: Nov 2013
Posts: 204
Reputation: 0
Default Include detectar ESC/PAUSE

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...
pdonald is offline   Reply With Quote
Old 07/05/2017, 03:01 AM   #2
CZ
Huge Clucker
 
CZ's Avatar
 
Join Date: Dec 2014
Location: Brazil
Posts: 386
Reputation: 18
Default Re: Include detectar ESC/PAUSE

http://www.mediafire.com/file/6omras...layerPause.inc
CZ is offline   Reply With Quote
Old 07/05/2017, 06:33 PM   #3
idegod
Big Clucker
 
Join Date: Mar 2017
Posts: 77
Reputation: 0
Default Re: Include detectar ESC/PAUSE

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

Não?
idegod is offline   Reply With Quote
Old 07/05/2017, 06:38 PM   #4
CaioTJF
Gangsta
 
CaioTJF's Avatar
 
Join Date: Sep 2012
Location: Rio de Janeiro
Posts: 545
Reputation: 164
Default Re: Include detectar ESC/PAUSE

Pra fazer essa função, é só você verificar se a callback OnPlayerUpdate está sendo chamada.
Se não está, o jogador está de esc.
__________________
owner
IP: server.gtatorcidas.net:2009 / Website: www.gtatorcidas.net



CaioTJF is offline   Reply With Quote
Old 07/05/2017, 06:50 PM   #5
IlanZ
High-roller
 
Join Date: Jul 2016
Location: Brasil
Posts: 1,348
Reputation: 75
Default Re: Include detectar ESC/PAUSE

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
IlanZ is online now   Reply With Quote
Old 10/05/2017, 02:23 AM   #6
pdonald
Huge Clucker
 
Join Date: Nov 2013
Posts: 204
Reputation: 0
Default Re: Include detectar ESC/PAUSE

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!

Last edited by pdonald; 14/05/2017 at 03:08 PM.
pdonald is offline   Reply With Quote
Old 10/05/2017, 02:34 AM   #7
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,314
Reputation: 720
Default Re: Include detectar ESC/PAUSE

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



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 10/05/2017, 03:22 AM   #8
s4kuL
High-roller
 
s4kuL's Avatar
 
Join Date: Apr 2012
Posts: 1,114
Reputation: 158
Default Re: Include detectar ESC/PAUSE

É 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;

s4kuL is offline   Reply With Quote
Old 10/05/2017, 03:41 AM   #9
Scorpion659
Huge Clucker
 
Scorpion659's Avatar
 
Join Date: Mar 2017
Posts: 267
Reputation: 3
Default Re: Include detectar ESC/PAUSE

@retirado
__________________
Meus Trabalhos


[FilterScripts] Plantação de Maconha
Scorpion659 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pause aboa Scripting Help 3 26/12/2013 09:58 AM
Pause Txt Configuration Scripting Help 1 01/07/2013 12:40 AM
Bug on pause.inc JaKe Elite Scripting Help 2 12/08/2012 01:08 AM
How am I able to pause an NPC? Luis- Scripting Help 2 20/04/2012 06:45 AM
NPC Pause? Oh Scripting Help 3 10/02/2012 07:32 AM


All times are GMT. The time now is 01:35 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.