10/02/2023 22:58
(10/02/2023 16:42)k2bi_YT Escreveu: Teste assimJá resolvi. era a define do MAX_RACE_POINTS faltava por o numero de checkpoint nela. mas obrigado pela ajuda
Código PHP:OnPlayerEnterRaceCheckpoint(playerid)
{
new sec = Mototime[playerid]%60;
new mins = (Mototime[playerid]/60)%60;
if(MotoGP[playerid] == 1)
{
MotoGate[playerid]++;
if(MotoGate[playerid] >= sizeof(corridacheckpoint))
{
new TimeRec;
new Timestr[200];
new driver[24];
GetPlayerName(playerid,driver,sizeof(driver));
format(Timestr,sizeof(Timestr),"%s {FFFFFF}Acabou a corrida ilegal [{FFF68F}%d {FFFFFF} Minutos, {FFF68F}%d {FFFFFF} Segundos] e ganhou {FFF68F}$2,000 {FFF68F}+5 Score",driver,mins,sec);
SendClientMessageToAll(0x375FFFFF,Timestr);
GivePlayerMoney(playerid,2000);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
SendClientMessage(playerid,Amarelo,"Você pode ver {FFF68F} 5 melhores tempos {FFFFFF}Digitando: {FFF68F}/Crank {FFFFFF}.");
printf(Timestr);
TimeRec=Mototime[playerid];
MotoGP[playerid] = 0;
MotoGate[playerid] = 0;
DisablePlayerRaceCheckpoint(playerid);
Mototime[playerid]=0;
UpdateList(playerid,TimeRec);
SetPlayerVirtualWorld(playerid, 0);
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), 0);
KillTimer(relogiotime[playerid]);
nacorrida[playerid]=0;
return true
}
else
if(MotoGate[playerid] >= sizeof(corridacheckpoint)-1)
{
SetPlayerRaceCheckpoint(playerid,1,corridacheckpoint[MotoGate[playerid]][0],corridacheckpoint[MotoGate[playerid]][1],corridacheckpoint[MotoGate[playerid]][2],corridacheckpoint[0][0],corridacheckpoint[0][1],corridacheckpoint[0][2],10);
return true;
}
SetPlayerRaceCheckpoint(playerid,0,corridacheckpoint[MotoGate[playerid]][0],corridacheckpoint[MotoGate[playerid]][1],corridacheckpoint[MotoGate[playerid]][2],corridacheckpoint[MotoGate[playerid]+1][0],corridacheckpoint[MotoGate[playerid]+1][1],corridacheckpoint[MotoGate[playerid]+1][2],10);
}
return 1;
}