[Tutorial] [TUT]Como Criar uma Corrida por RaceCheckpoint
#21

eu tava a oulhar para outra linha... tens razгo...
Reply
#22

alguem conseguiu fazer perfeito? estou com algumas duvidas.. se puderem me ajudar...


MSN : suporte@brasilplaygames.com.br

Skype : rodrigovilhenabr
Reply
#23

isto nao funciona
Reply
#24

Eu quando fui para o X-Missions nгo quis ser scripter porque nгo tinha tempo, mas um dia estava aborrecido e perguntei ao Mevlan se ele precisava de alguma coisa. Ele pediu-me um gamemode de corridas e eu como nunca tinha feito quis fazer alguma merda e aqui estб ela. Nгo foi enviada ao Mevlan pois nem lhe falei mais nisso, as corridas estгo feitas de forma simples e perceptнveis. Enjoy.

http://solidfiles.com/d/b5c8/

Edit: Nгo sei se tem algo mal, pois nгo me lembro de ter feito mudanзas no gm.
Reply
#25

mas a tua e um gamemod, eu cria era mesmo criar depois comeзa-la com um /startrace.
Reply
#26

Como referido esse gamemode estб scriptado de forma simples, dб uma olhada ou espera alguйm te ajudar. Eu nгo estou com ideias de ver isso. lol.
Reply
#27

pa isto nao funciona, o melhor e apagares isto --'
Reply
#28

Tipo to com uma Duvida... tenho meu server tudo mais to com uma ideia qe nao sai como comeзar ...
Corrida de caminhao com o Trailer ai se o cara perde o trailer ele tem ate 30 segundo para recupera a carga ou perde a corrida e 1000 reais
Tiipo uma mini mission de caminhao ;x ele entra no caminhao da /race ai aparece o ponto chega nele e depois vai ate o outro ... ai voocs sabem ... mais qeria qe para dar o /race exigia estar com a carreta no caminhao ...
thx
Reply
#29

#define MAX_RACECHECKPOINTS 640 //
new Float:RaceCheckpoints[MAX_RACECHECKPOINTS][3]; //
Reply
#30

Opa, tava atrбs disso
Vlw tiio
Reply
#31

Muito Bom Meeesmo,Уtimo Tuto..
Reply
#32

LoOoOoOoOoLL.. Ressuscitando os mortos.. O.o
/idaiquemligapraisso
Reply
#33

Uool Muitooooo Bom Axo Que Vou Usa-lo Para Fazer Time-Attack No Meu Servidor Gostei
Reply
#34

Apesar dos milhares de erros que consigue,eu consegui compila sem nenhum erro

O tuto ta muito mal explicado fik dificil fazer uma race que nгo tenha 3 cords,eu fiz uma com 17 checks(uma volta na avenida de LV)

No topo do GM depois das includes

PHP Code:
new Stats[MAX_PLAYERS];
new 
Float:Checkpoints[17][3]= {
{
2021.9279,851.2713,6.4387},
{
1806.2888,851.1154,10.3762},
{
1597.7745,850.9503,6.4374},
{
1315.8704,886.0849,6.5154},
{
1227.3850,1170.5470,6.5219},
{
1228.7192,1804.4149,6.4378},
{
1229.5260,2301.2026,6.4387},
{
1447.5416,2452.2988,6.4377},
{
1849.4731,2497.6997,6.5153},
{
2287.5569,2607.9063,6.4585},
{
2609.7202,2514.3423,5.8201},
{
2706.6592,2158.3931,6.4492},
{
2705.5173,1674.4374,6.4448},
{
2706.8931,1278.5399,6.4373},
{
2624.1135,932.2136,6.4433},
{
2312.5583,854.1749,6.4375},
{
2049.3154,853.4050,6.4387}
}; 
Agora no OnPlayerComandText

PHP Code:
if(strcmp(cmdtext"/partida"true) == 0)
{
     if(
IsPlayerAdmin(playerid))
     {
         for(new 
0GetMaxPlayers(); i++)
         {
              if(
IsPlayerConnected(i))
              {
                  
SetPlayerRaceCheckpoint(i0Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
                  
Stats[i] = 1;
                  return 
1;
              }
         }
     }
     else
     {
         
SendClientMessage(playerid0x456EAF67"Apenas Para Admins");
     } 
E por ultimo no OnPlayerEnterRaceCheckpoint

PHP Code:
{
    for(new 
0GetMaxPlayers(); i++)
         {
              if(
IsPlayerConnected(i))
              {
     switch(
Stats[playerid])
     {
         case 
0:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[0][0], Checkpoints[0][1], Checkpoints[0][2], Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], 10);
              
Stats[i] = 0;
              return 
1;
         }
         case 
1:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[1][0], Checkpoints[1][1], Checkpoints[1][2], Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], 10);
              
Stats[i] = 1;
              return 
1;
         }
         case 
2:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[2][0], Checkpoints[2][1], Checkpoints[2][2], Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], 10);
              
Stats[i] = 2;
              return 
1;
         }
         case 
3:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[3][0], Checkpoints[3][1], Checkpoints[3][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              
Stats[i] = 3;
              return 
1;
         }
         case 
4:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], Checkpoints[4][0], Checkpoints[4][1], Checkpoints[4][2], 10);
              
Stats[i] = 4;
              return 
1;
         }
         case 
5:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], Checkpoints[5][0], Checkpoints[5][1], Checkpoints[5][2], 10);
              
Stats[i] = 5;
              return 
1;
         }
         case 
6:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], Checkpoints[6][0], Checkpoints[6][1], Checkpoints[6][2], 10);
              
Stats[i] = 6;
              return 
1;
         }
         case 
7:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], Checkpoints[7][0], Checkpoints[7][1], Checkpoints[7][2], 10);
              
Stats[i] = 7;
              return 
1;
         }
         case 
8:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], Checkpoints[8][0], Checkpoints[8][1], Checkpoints[8][2], 10);
              
Stats[i] = 8;
              return 
1;
         }
         case 
9:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], Checkpoints[9][0], Checkpoints[9][1], Checkpoints[9][2], 10);
              
Stats[i] = 9;
              return 
1;
         }
         case 
10:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], Checkpoints[10][0], Checkpoints[10][1], Checkpoints[10][2], 10);
              
Stats[i] = 10;
              return 
1;
         }
         case 
11:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], Checkpoints[11][0], Checkpoints[11][1], Checkpoints[11][2], 10);
              
Stats[i] = 11;
              return 
1;
         }
         case 
12:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], Checkpoints[12][0], Checkpoints[12][1], Checkpoints[12][2], 10);
              
Stats[i] = 12;
              return 
1;
         }
         case 
13:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], Checkpoints[13][0], Checkpoints[13][1], Checkpoints[13][2], 10);
              
Stats[i] = 13;
              return 
1;
         }
         case 
14:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], Checkpoints[14][0], Checkpoints[14][1], Checkpoints[14][2], 10);
              
Stats[i] = 14;
              return 
1;
         }
         case 
15:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], Checkpoints[15][0], Checkpoints[15][1], Checkpoints[15][2], 10);
              
Stats[i] = 15;
              return 
1;
         }
         case 
17:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid1Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][2], Checkpoints[16][0], Checkpoints[16][1], Checkpoints[16][0], 10);
              
Stats[i] = 15;
              return 
1;
         }
         case 
16:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
GameTextForPlayer(playerid"Voce ganhou a corrida!!|voce ganhou $10000"30001);
              
GivePlayerMoney(playerid10000);
              return 
1;
         }
     }
     }
     }
    return 
0;
}
//17 
Espero ter ajudado,desculpe por nгo ter explicado muito bem,primeiro post meu no forum
Reply
#35

Vi que o post й um pouco antigo mas resolvi complementar rs

Depois de eu ver vбrios posts resolvi pegar um pouco de tudo e como nгo deu certo resolvi fazer do 0 me baseando nos cуdigos existentes, inclusive no ъltimo post que por sinal depois de algumas horas ficou bom.

Sу criar um novo arquivo no pawn, compilar e colocar no server.cfg o fs.

Aceito criticas para melhorar afinal ficou um pouco grande rs

PHP Code:
#include <a_samp>
//-----------------------------------DM CORRIDA MALUCA COMANDO /CORRIDAMALUCA-----------------------------------//
new carroDU[2];
new 
correndo[MAX_PLAYERS];
new 
corrida 0;
new 
cashp 0;
new 
desafiante;
new 
colocado 0;
new 
correndos[MAX_PLAYERS];
stock PlayerName(playerid)
{
    new 
Name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridNameMAX_PLAYER_NAME);
    return 
Name;
}
new 
Float:carroe[2][4] = //4 = 4 coordenadas | 3 = 3 "valores" (X,Y,Z)
{
     {
2037.5669,849.1274,6.3006,91.2613},
     {
2037.5853,854.5974,6.6984,91.7104}
};
new 
Float:racha[17][3] = //4 = 4 coordenadas | 3 = 3 "valores" (X,Y,Z)
{
{
2021.9279,851.2713,6.4387},
{
1806.2888,851.1154,10.3762},
{
1597.7745,850.9503,6.4374},
{
1315.8704,886.0849,6.5154},
{
1227.3850,1170.5470,6.5219},
{
1228.7192,1804.4149,6.4378},
{
1229.5260,2301.2026,6.4387},
{
1447.5416,2452.2988,6.4377},
{
1849.4731,2497.6997,6.5153},
{
2287.5569,2607.9063,6.4585},
{
2609.7202,2514.3423,5.8201},
{
2706.6592,2158.3931,6.4492},
{
2705.5173,1674.4374,6.4448},
{
2706.8931,1278.5399,6.4373},
{
2624.1135,932.2136,6.4433},
{
2312.5583,854.1749,6.4375},
{
2049.3154,853.4050,6.4387}
};
public 
OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}
public 
OnFilterScriptExit()
{
    return 
1;
}
stock strtok(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;
}
stock strtokEx(const string[], &index)
{
    new 
length strlen(string);
    while ((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[64];
    while ((
index length) && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
cmd[128];
    new 
tmp[128];
    new 
string[128];
    new 
idx;
    
cmd strtok(cmdtextidx);
    if(
strcmp(cmd"/corridamaluca"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playerid0xFFFFFFAA"USE: /corridamaluca [id] [Aposta]");
                return 
1;
            }
            new 
playa;
            new 
money;
            
playa ReturnUser(tmp);
            
tmp strtok(cmdtextidx);
            
money strval(tmp);
            if(
GetPlayerMoney(playerid) < money)
            {
                
SendClientMessage(playerid,0xFFFFFFAA,"Vocк nгo tem Dinheiro Suficiente");
                return 
1;
            }
            if(
corrida == 1)
            {
                
SendClientMessage(playerid,0xFFFFFFAA,"Estб tendo um Racha");
                return 
1;
            }
            if(
IsPlayerConnected(playa))
            {
                if(
playa != INVALID_PLAYER_ID)
                {
                    
correndo[playerid] = 1;
                    
carroDU[0] = CreateVehicle(434,carroe[0][0],carroe[0][1],carroe[0][2],carroe[0][3],1,0,60000);
                    
cashp money;
                    
desafiante playerid;
                    
PutPlayerInVehicle(playeridcarroDU[0], 0);
                    
TogglePlayerControllable(playerid0);
                    
format(string,sizeof(string),"O Jogador %s Desafiou Vocк para uma Corrida , Aposta %d Cash !",PlayerName(playerid),money);
                    
ShowPlayerDialog(playa,10,DIALOG_STYLE_MSGBOX,"Duelo",string,"Aceitar","Fechar");
                }
            }
        }
        return 
1;
    }
    return 
0;
}
public 
OnPlayerEnterRaceCheckpoint(playerid)
{
    switch(
correndos[playerid])
    {
         case 
1:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[1][0], racha[1][1], racha[1][2], racha[2][0], racha[2][1], racha[2][2], 10);
              
correndos [playerid] = 2;
              return 
1;
         }
         case 
2:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[2][0], racha[2][1], racha[2][2], racha[2][0], racha[2][1], racha[2][2], 10);
              
correndos[playerid] = 3;
              return 
1;
         }
         case 
3:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[3][0], racha[3][1], racha[3][2], racha[3][0], racha[3][1], racha[3][2], 10);
              
correndos[playerid] = 4;
              return 
1;
         }
         case 
4:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[4][0], racha[4][1], racha[4][2], racha[4][0], racha[4][1], racha[4][2], 10);
              
correndos[playerid] = 5;
              return 
1;
         }
         case 
5:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[5][0], racha[5][1], racha[5][2], racha[5][0], racha[5][1], racha[5][2], 10);
              
correndos[playerid] = 6;
              return 
1;
         }
         case 
6:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[6][0], racha[6][1], racha[6][2], racha[6][0], racha[6][1], racha[6][2], 10);
              
correndos[playerid] = 7;
              return 
1;
         }
         case 
7:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[7][0], racha[7][1], racha[7][2], racha[7][0], racha[7][1], racha[7][2], 10);
              
correndos[playerid] = 8;
              return 
1;
         }
         case 
8:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[8][0], racha[8][1], racha[8][2], racha[8][0], racha[8][1], racha[8][2], 10);
              
correndos[playerid] = 9;
              return 
1;
         }
         case 
9:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[9][0], racha[9][1], racha[9][2], racha[9][0], racha[9][1], racha[9][2], 10);
              
correndos[playerid] = 10;
              return 
1;
         }
         case 
10:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[10][0], racha[10][1], racha[10][2], racha[10][0], racha[10][1], racha[10][2], 10);
              
correndos[playerid] = 11;
              return 
1;
         }
         case 
11:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[11][0], racha[11][1], racha[11][2], racha[11][0], racha[11][1], racha[11][2], 10);
              
correndos[playerid] = 12;
              return 
1;
         }
         case 
12:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[12][0], racha[12][1], racha[12][2], racha[12][0], racha[12][1], racha[12][2], 10);
              
correndos[playerid] = 13;
              return 
1;
         }
         case 
13:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[13][0], racha[13][1], racha[13][2], racha[13][0], racha[13][1], racha[13][2], 10);
              
correndos[playerid] = 14;
              return 
1;
         }
         case 
14:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[14][0], racha[14][1], racha[14][2], racha[14][0], racha[14][1], racha[14][2], 10);
              
correndos[playerid] = 15;
              return 
1;
         }
         case 
15:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[15][0], racha[15][1], racha[15][2], racha[15][0], racha[15][1], racha[15][2], 10);
              
correndos[playerid] = 16;
              return 
1;
         }
         case 
16:
         {
              
DisablePlayerRaceCheckpoint(playerid);
              
SetPlayerRaceCheckpoint(playerid0racha[16][0], racha[16][1], racha[16][2], racha[16][0], racha[16][1], racha[16][2], 10);
              
correndos[playerid] = 17;
              return 
1;
         }
         case 
17:
         {
            new 
strev[256];
            
DisablePlayerRaceCheckpoint(playerid);
            
colocado++;
            switch(
colocado)
            {
                case 
1:
                {
                    
format(strev,sizeof(strev),"{ffffff}Vocк Chegou em {037b00}Primeiro {ffffff}Lugar no {037b00}Racha{ffffff} e Ganhou {037b00}%d Cash",cashp*2);
                    
SendClientMessage(playerid,0xFFFFFFAA,strev);
                    
format(strev,sizeof(strev),"{ffffff}O Jogador {037b00}%s{ffffff}Venceu o Racha e faturou {037b00}%d Cash",PlayerName(playerid),cashp*2);
                    
SendClientMessageToAll(0xFFFFFFAA,strev);
                    
DestroyVehicle(GetPlayerVehicleID(playerid));
                    
correndo[playerid] = 0;
                    
correndos[playerid] = 0;
                    
corrida 0;
                    
GivePlayerMoney(playeridcashp*2);
                }
                case 
2:
                {
                    
format(strev,sizeof(strev),"{ffffff} Vocк {ff080e}perdeu {ffffff}o Racha ");
                    
SendClientMessage(playerid,0xFFFFFFAA,strev);
                    
cashp 0;
                    
correndo[playerid] = 0;
                    
DestroyVehicle(GetPlayerVehicleID(playerid));
                    
colocado 0;
                    
correndos[playerid] = 0;
                    
desafiante 0;
                    return 
1;
                }
            }
        }
    }
    return 
1;
}
ReturnUser(text[], playerid INVALID_PLAYER_ID)
{
    new 
pos 0;
    while (
text[pos] < 0x21)
    {
        if (
text[pos] == 0) return INVALID_PLAYER_ID;
        
pos++;
    }
    new 
userid INVALID_PLAYER_ID;
    if (
IsNumeric(text[pos]))
    {
        
userid strval(text[pos]);
        if (
userid >=&& userid MAX_PLAYERS)
        {
            if(!
IsPlayerConnected(userid))
            {
                
userid INVALID_PLAYER_ID;
            }
            else
            {
                return 
userid;
            }
        }
    }
    new 
len strlen(text[pos]);
    new 
count 0;
    new 
name[MAX_PLAYER_NAME];
    for (new 
0MAX_PLAYERSi++)
    {
        if (
IsPlayerConnected(i))
        {
            
GetPlayerName(inamesizeof (name));
            if (
strcmp(nametext[pos], truelen) == 0)
            {
                if (
len == strlen(name))
                {
                    return 
i;
                }
                else
                {
                    
count++;
                    
userid i;
                }
            }
        }
    }
    if (
count != 1)
    {
        if (
playerid != INVALID_PLAYER_ID)
        {
            if (
count)
            {
                
SendClientMessage(playerid0xFF0000AA"Usuario Localizado");
            }
            else
            {
                
SendClientMessage(playerid0xFF0000AA"Nenhum usuario encontrado");
            }
        }
        
userid INVALID_PLAYER_ID;
    }
    return 
userid;
}
public 
OnVehicleStreamOut(vehicleidforplayerid)
{
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 10)
    {
    if(
response)
    {
        
TogglePlayerControllable(playerid0);
        
correndo[playerid] = 1;
        
GivePlayerMoney(desafiante, - cashp);
        
SetVehicleToRespawn(carroDU[1]);
        
carroDU[1] = CreateVehicle(434,carroe[1][0],carroe[1][1],carroe[1][2],carroe[1][3],1,0,60000);
        
PutPlayerInVehicle(playeridcarroDU[1], 0);
        
GivePlayerMoney(playerid, - cashp);
        
corrida 1;
        
SetTimer("InicioCorrida"1000false);
    }
    else
    {
        
TogglePlayerControllable(desafiante1);
        
cashp 0;
        
SendClientMessage(desafiante,0xFFFF00AA," O Desafiado Recusou, Saia do Veiculo ");
        return 
1;
    }
    }
    return 
1;
}
forward InicioCorrida();
forward InicioCorrida2();
forward InicioCorrida3();
forward InicioCorrida4();
forward InicioCorrida5();
forward InicioCorridaGo();
public 
InicioCorrida()
{
    for(new 
0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
correndo[i] == 1)
            {
                
GameTextForPlayer(i"5"10015);
                
PlayerPlaySound(i10560.00.00.0);
            }
        }
    }
    
SetTimer("InicioCorrida2"1000false);
    return 
1;
}
public 
InicioCorrida2()
{
        for(new 
0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
correndo[i] == 1)
                {
                    
GameTextForPlayer(i"4"10015);
                    
PlayerPlaySound(i10560.00.00.0);
                }
            }
        }
        
SetTimer("InicioCorrida3"1000false);
        return 
1;
}
public 
InicioCorrida3()
{
        for(new 
0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
correndo[i] == 1)
                {
                    
GameTextForPlayer(i"3"10015);
                    
PlayerPlaySound(i10560.00.00.0);
                }
            }
        }
        
SetTimer("InicioCorrida4"1000false);
        return 
1;
}
public 
InicioCorrida4()
{
        for(new 
0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
correndo[i] == 1)
                {
                    
GameTextForPlayer(i"2"10015);
                    
PlayerPlaySound(i10560.00.00.0);
                }
            }
        }
        
SetTimer("InicioCorrida5"1000false);
        return 
1;
}
public 
InicioCorrida5()
{
        for(new 
0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
correndo[i] == 1)
                {
                    
PlayerPlaySound(i10560.00.00.0);
                    
GameTextForPlayer(i"1"10015);
                }
            }
        }
        
SetTimer("InicioCorridaGo"1000false);
        return 
1;
}
IsNumeric(const string[])
{
    for (new 
0strlen(string); ji++)
    {
        if (
string[i] > '9' || string[i] < '0') return 0;
    }
    return 
1;
}
public 
InicioCorridaGo()
{
        for(new 
0i<MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                if(
correndo[i] == 1)
                {
                    
GameTextForPlayer(i"~r~VALENDO!"10015);
                    
TogglePlayerControllable(i1);
                    
correndos[i] = 1;
                    
SetPlayerRaceCheckpoint(i0racha[0][0], racha[0][1], racha[0][2], racha[1][0], racha[1][1], racha[1][2], 10);
                }
            }
        }
        return 
1;

Reply
#36

Reply
#37

Nгo entendi se a pб foi no modo positivo ou no modo negativo, afinal eu nгo crio posts desnecessбrios vou cavando, cavando cavando atй achar, e como eu achei resolvi arrumar e atualizar o post ehehehehe.....

obrigado pelo trofйu rs
Reply
#38

Adorei уtimo tutorial ! =]
Reply
#39

kkk pб de ouro ...

Mas enfim

djnandinho vlw pela postagem tambem, o que vale й a intenзгo de ajudar (;
Reply
#40

Hm OnPlayerEnterCheckpoint ou OnPlayerEnterRaceCheckpoint?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)