[Ajuda] Erros
#1

Resolvido !
Reply
#2

Retirei alguns erros, tenta ae

PHP код:
#include <a_samp>
#include <zcmd>
#define ROUNDTEMPO 900000 // Tempo do round em segundos
new Text:RoundCount;
new 
roundtime;
new 
Segundos[MAX_PLAYERS];
new 
Minutos[MAX_PLAYERS];
new 
MS[MAX_PLAYERS];
public 
OnGameModeInit()
{
    
RoundCount TextDrawCreate(270.000000397.000000"_");
    
TextDrawBackgroundColor(RoundCount255);
    
TextDrawFont(RoundCount2);
    
TextDrawLetterSize(RoundCount0.5000002.199999);
    
TextDrawColor(RoundCount, -1);
    
TextDrawSetOutline(RoundCount1);
    
TextDrawSetProportional(RoundCount1);
    return 
1;
}
/* Comando */
CMD:iround(playerid) { return roundtime SetTimerEx("RoundTime"10000"d"playerid); }
forward RoundTime(playerid);
public 
RoundTime(playerid)
{
    
SetTimerEx("RoundCounter"91"d"playerid);
    
MS[playerid] = 99;
    
Segundos[playerid] = ROUNDTEMPO;
    
TextDrawShowForAll(Text:RoundCount);
    
KillTimer(roundtime);
    return 
1;
}
forward RoundCounter(playerid);
public 
RoundCounter(playerid)
{
    
MS[playerid]--;
    if(
MS[playerid] == 0)
    {
        
MS[playerid] = 99;
        
Segundos[playerid]--;
    }
    if(
Segundos[playerid] > 60)
    {
        new 
Segundos2 Segundos[playerid] - 60;
        
Segundos[playerid] = Segundos2;
        
Minutos[playerid]++;
    }
    if(
Segundos[playerid] == && Minutos[playerid] > 0)
    {
        
Segundos[playerid] = 59;
        
Minutos[playerid]--;
    }
    if(
Segundos[playerid] == && MS[playerid] == 1)
    {
        
TextDrawHideForAll(Text:RoundCount);
        
//terminou o round
        
KillTimer(roundtime);
    }
    if(
Segundos[playerid] < 10)
    {
        new 
count[10];
        
format(countsizeof(count), "00:0%i:%i"Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    if(
Segundos[playerid] >= 10)
    {
        new 
count[10];
        
format(countsizeof(count), "00:%i:%i"Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    if(
Minutos[playerid] < 10 && Segundos[playerid] < 10)
    {
        new 
count[10];
        
format(countsizeof(count), "0%i:0%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    if(
Minutos[playerid] < 10 && Segundos[playerid] > 9)
    {
        new 
count[10];
        
format(countsizeof(count), "0%i:%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    if(
Minutos[playerid] >= 10 && Segundos[playerid] > 9)
    {
        new 
count[10];
        
format(countsizeof(count), "%i:%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    if(
Minutos[playerid] >= 10 && Segundos[playerid] < 10)
    {
        new 
count[10];
        
format(countsizeof(count), "%i:0%i:%i",Minutos[playerid], Segundos[playerid], MS[playerid]);
        
TextDrawSetString(RoundCountcount);
    }
    return 
1;

Reply
#3

Resolvido !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)