29.12.2010, 00:52
e ae galera!!!!!, eu usei o gerador de checkpoints da fek squad, pus no meu gm, ae digitei o comando fui ver, apareceu o checkpoints, mas so q quando passo por cima com um carro ou apй ele nao passa pro outro check!!!, alguem poderia mim ajudar!, obrigado
code:
code:
pawn Код:
//- http://www.feksquad.blogspot.com -//
//- Race Creator in PHP By DraKiNs -//
#include <a_samp>
#define TOTAIS_CHECKS 9
new Stats[MAX_PLAYERS];
new bool:PlayerRa[500];
new Float:Checkpoints[TOTAIS_CHECKS][3] =
{
{ 2240.4260,1353.1127,10.2698 },
{ 2408.3813,1350.9872,7.1641
},{ 2405.2244,1213.0823,7.1641
},{ 2225.2783,1215.9548,10.7905
},{ 2239.3381,1352.7955,10.4686
},{ 2407.1101,1348.8556,7.1641
},{ 2406.0603,1212.8149,7.1641
},{ 2225.6289,1216.2898,10.2862 },
{ 2239.7048,1353.0103,10.4016 }
};
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/circuito", true))
{
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк foi para o Race");
PlayerRa[playerid] = true;
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
Stats[playerid]++;
return true;
}
return false;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(PlayerRa[playerid] == true)
{
Stats[playerid]++;
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid, 0, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
}
if(Stats[playerid] == TOTAIS_CHECKS-1 && PlayerRa[playerid] == true)
{
DisablePlayerRaceCheckpoint(playerid);
SetPlayerRaceCheckpoint(playerid,1, Checkpoints[Stats[playerid]][0], Checkpoints[Stats[playerid]][1], Checkpoints[Stats[playerid]][2], Checkpoints[Stats[playerid]+1][0], Checkpoints[Stats[playerid]+1][1], Checkpoints[Stats[playerid]+1][2], 10);
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк esta quase acabando a corrida!!");
}
if(Stats[playerid] == TOTAIS_CHECKS && PlayerRa[playerid] == true)
{
PlayerRa[playerid] = false;
Stats[playerid] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Vocк acabou o Race parabйns");
DisablePlayerRaceCheckpoint(playerid);
}
return true;
}