Reading from file works not perfect.. [NOT SOLVED]
#10

And the problem is not only OnPlayerEnterRaceCheckpoint also StartRace (Only SetPlayerRaceCheckpoint bugs at 0.0, 0.0, 0.0)

Код:
forward SetupRace(playerid);
public SetupRace(playerid)
{
	SetPlayerPos(playerid, vPos[1], vPos[2], vPos[3]);
	RaceVehicle[playerid] = CreateVehicle(Vehicle, vPos[1], vPos[2], vPos[3], vPos[4], random(126), random(126), (30 * 60));
	PutPlayerInVehicle(playerid, RaceVehicle[playerid], 0);
	TogglePlayerControllable(playerid, false);
	SetPlayerRaceCheckpoint(playerid, 0, CP[WhichCheckpoint[playerid]][1], CP[WhichCheckpoint[playerid]][2], CP[WhichCheckpoint[playerid]][3], CP[WhichCheckpoint[playerid]+1][1], CP[WhichCheckpoint[playerid]+1][2], CP[WhichCheckpoint[playerid]+1][3], CP_SIZE);
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	PlayerPlaySound(playerid, 1137, 0.0, 0.0, 0.0);
	WhichCheckpoint[playerid]++;
	SetPlayerRaceCheckpoint(playerid, 0, CP[WhichCheckpoint[playerid]][1], CP[WhichCheckpoint[playerid]][2], CP[WhichCheckpoint[playerid]][3], CP[WhichCheckpoint[playerid]+1][1], CP[WhichCheckpoint[playerid]+1][2], CP[WhichCheckpoint[playerid]+1][3], CP_SIZE);
	return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 6 Guest(s)