[Ajuda] SetTimerEx
#8

Quote:
Originally Posted by Luiiiz
Посмотреть сообщение
Comecei a mexer com SetTimerEx a pouco tempo e quero saber como que geto o tempo que falta no SetTimerEx.
Exemplo: Digitei o comando /kill e morri. Sу depois de 20 segundos eu posso voltar a usб-lo. Daн ainda nгo se passou 20 segundos. Ai aparece: Vocк deve esperar .. segundos para usar /kill novamente.
Esse .. seria o tempo que falta...
amigo ъnica forma que conheзo para fazer isto й assim..

desculpe por tar mal organizado mais й sу vocк ajeitar que ta de boa..

PHP код:
SetTimer("MORRER"10001);
new 
tempomorrer[MAX_PLAYERS];
if(
strcmp("/kill"cmdtexttrue) == 0)
{
      new 
string[128];
      if(!(
tempomorrer[playerid] == 0))
      {
            
format(stringsizeof(string), "desculpe, mas vocк deve aguardar mais %d segundos para suicidar-se novamente."tempomorrer[playerid]);
        
SendClientMessage(playerid0xFF0000AAstring);
      }
      else
      {
            
SetPlayerHealth(playerid0);
            
SendClientMessage(playerid0x00FF00AA"vocк se matou.");
            
tempomorrer[playerid] = 20//TEM QUE ESPERAR 20 SEGUNDOS PARA PODER SE MATAR NOVAMENTE
      
}
      return 
1;
}
forward MORRER();
public 
MORRER()
{
      for(new 
0MAX_PLAYERSi++)
      {
            if(
IsPlayerConnected(i))
        {
              if(!(
tempomorrer[i] == 0))
          {
                        
tempomorrer[i] = tempomorrer[i]-1;
          }
        }
      }
      return 
1;

Reply


Messages In This Thread
SetTimerEx - by Luiiiz - 28.01.2017, 23:06
Re: SetTimerEx - by JonathanFeitosa - 28.01.2017, 23:09
Re: SetTimerEx - by Luiiiz - 28.01.2017, 23:14
Re: SetTimerEx - by Luiiiz - 28.01.2017, 23:17
Re: SetTimerEx - by Whoo - 28.01.2017, 23:22
Re: SetTimerEx - by GuiKommander - 29.01.2017, 03:05
Re: SetTimerEx - by Luiiiz - 29.01.2017, 17:30
Re: SetTimerEx - by HoodScript - 29.01.2017, 21:22
Re: SetTimerEx - by AuhMaru - 30.01.2017, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)