[Ajuda] Cifrгo
#2

CreatePickup
SetTimerEx

Para fazer o timer de 50 minutos, e verificar se o jogador jб pegou o dinheiro, poderб fazer assim:

Topo
PHP код:
new bool:PegouGrana[MAX_PLAYERS];
new 
TimerGrana[MAX_PLAYERS]; 
OnPlayerDisconnect:
PHP код:
KillTimer(TimerGrana[playerid]);
PegouGrana[playerid] = false; 
Cria o timer quando o player pegar a grana, La na sua funзгo:
PHP код:
if(PegouGrana[playerid] == true) return SendClientMessage(playerid, 0xFF0000FF, "| ERRO | Vocк Jб Pegou Grana, Espere Um Pouco Para Pegar Novamente.");
TimerGrana[playerid] = SetTimerEx("TimerPegarGrana", 3000000, false, "i", playerid);
PegouGrana[playerid] = true; 
Public TimerPegarGrana, final do Gm:
PHP код:
forward TimerPegarGrana(playerid);
public 
TimerPegarGrana(playerid)
{
    
PegouGrana[playerid] = false;
    
} 
Reply


Messages In This Thread
Cifrгo - by BrGabrielBr - 05.04.2018, 22:04
Re: Cifrгo - by AllanSG - 06.04.2018, 00:26
Re: Cifrгo - by BrGabrielBr - 06.04.2018, 00:52

Forum Jump:


Users browsing this thread: 1 Guest(s)