Race problem
#1

Hello guys
I have a problem
When I am alone on the server the race works perfectry fine
But when there are 2 or more players the race wont start.
It just doesnt show the second checkpoint( it does the count down and everything but when the countdown it just calls the LEAVE_RACE callback for all the racers(players)

PHP код:
function CountDownForAll(times)
{
foreach(new 
Player)
{
new 
raceid GetPVarInt(i,"raceID");
if(
times)
{
if(
IsPlayerInRaceCheckpoint(i) && (GetVehicleModel(GetPlayerVehicleID(i)) == RaceInfo[raceid][racevehicle]))
{
GameTextForPlayer(iCDTxt[times], 15003);
PlayerPlaySound(i1056000);
}
SetTimerEx("CountDownForAll",1000,false,"i",times-1);
}
else
{
if(
IsPlayerInRaceCheckpoint(i) && (GetVehicleModel(GetPlayerVehicleID(i)) == RaceInfo[raceid][racevehicle]))
{
GameTextForPlayer(iCDTxt[times], 10003);
PlayerPlaySound(i1057000);
SetPlayerRaceCheckpoint(i0RaceInfo[raceid][checkpointx][1], RaceInfo[raceid][checkpointy][1], RaceInfo[raceid][checkpointz][1], RaceInfo[raceid][checkpointx][2], RaceInfo[raceid][checkpointy][2], RaceInfo[raceid][checkpointz][2], CP_SIZE);
RaceCheckpoint[i] = 2;
RaceInfo[raceid][originalcount] ++;
RaceInfo[raceid][racecount] ++;
if(
RaceInfo[raceid][originalcount] == 0) return 1;
RaceInfo[raceid][racetimer] = SetTimerEx("RaceTime"10true"dd"raceid,i);
RaceInfo[raceid][racerunning] = true;
new 
string[512];
format(stringsizeof(string),"%s~n~Time:%s~n~Checkpoints:%d/%d",RaceInfo[raceid][racename],ReturnTime(RaceInfo[raceid][racetime]),RaceCheckpoint[i]-2,RaceInfo[raceid][cpnum] - 1);
PlayerTextDrawSetString(i,RaceTextDraw[i][0],string);
PlayerTextDrawShow(iRaceTextDraw[i][0]);
RaceInfo[raceid][raceticktime] = GetTickCount();
}
else
{
LeaveRace(iraceid);
}
}
}
return 
1;

Reply


Messages In This Thread
Race problem kinda wierd - by kalanerik99 - 06.06.2017, 14:09
Re: Race problem - by Loinal - 06.06.2017, 15:11
Re: Race problem - by JasonRiggs - 06.06.2017, 15:14
Re: Race problem - by kalanerik99 - 06.06.2017, 16:16
Re: Race problem - by kalanerik99 - 07.06.2017, 09:36
Re: Race problem - by Jefff - 07.06.2017, 20:28
Re: Race problem - by kalanerik99 - 07.06.2017, 22:18
Re: Race problem - by Jefff - 07.06.2017, 22:35
Re: Race problem - by kalanerik99 - 07.06.2017, 22:35
Re: Race problem - by Jefff - 07.06.2017, 22:42

Forum Jump:


Users browsing this thread: 2 Guest(s)