[AJUDA] Ligar Timer
#1

Ja fiz tudo na conce, agr so ta dando poblema no no tempo, nao tu conseguindo ligar o comando /teste ao contador, segue as linhas :

Comando:

PHP код:
if(strcmp("/teste"cmdtexttrue10) == 0)
        {
                if(
IsPlayerConnected(playerid))
                {
                        new 
carid GetPlayerVehicleID(playerid);
                        if(
Testedrive(carid))
                        {
                        
Teste[playerid] = GetPlayerVehicleID(playerid);
                        
SetTimer("testtimer"1200001);
                        
PlayerPlaySound(playerid10520.00.00.0);
                        
TogglePlayerControllable(playerid1);
                        
GameTextForPlayer(playerid"~w~O Teste Drive Em ~b~120 SEG~n~ ~w~Acaba, Bom Proveito"50003);
                        }
                }
                return 
1;
        } 
Timer:

PHP код:
public testtimer()
{
    for(new 
i=0;i<MAX_PLAYERS;i++)
    {
        if(
Teste[i] == 1)
        {
            
TimeTest[i]++;
            new 
str[256];
            
format(str256," ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ tempo: ~w~%d"TimeTest[i]);
            
GameTextForPlayer(istr2000,6);
            if(
TimeTest[i] >= 120 && Teste[i] == 1)
            {
                
TimeTest[i]=0;
                
Teste[i] = 0;
                
TakingLesson[i] = 0;
                
KillTimer(testtempo);
                
KillTimer(testtempo);
                
KillTimer(testtempo);
                
SendClientMessage(iCOLOR_OOC"Tempo Acabado, Volte Sempre");
                
SetVehicleToRespawn(i);
                
SetPlayerPos(i,-2048.0999, -84.500035.0000);
                
GameTextForPlayer(i"~y~Seu Teste Driver Acabou~n~~r~Se Quiser Compra o Carro /compra [CarroNome/ID]"50003);
             }
        }
    }
    return 
0;

Reply


Messages In This Thread
[AJUDA] Ligar Timer - by atsbs - 26.11.2011, 01:59
Re: [AJUDA] Ligar Timer - by Lуs - 26.11.2011, 03:09
Re: [AJUDA] Ligar Timer - by atsbs - 26.11.2011, 03:21
Re: [AJUDA] Ligar Timer - by Lуs - 26.11.2011, 04:07
Re: [AJUDA] Ligar Timer - by atsbs - 26.11.2011, 04:35
Re: [AJUDA] Ligar Timer - by atsbs - 26.11.2011, 14:58

Forum Jump:


Users browsing this thread: 1 Guest(s)