Checkpoint type. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint type. (
/showthread.php?tid=179076)
Checkpoint type. -
Seven. - 25.09.2010
The first checkpoint gives me the correct checkpoint (air - type 3)
When entering it it gives the rest normal race checkpoint (car race - type 0)
How to make it give me the whole time air cp
pawn Код:
//onplayerspawn
SetPlayerRaceCheckpoint(playerid, 3, gCheckpoints[gCheckpoint[playerid]][0], gCheckpoints[gCheckpoint[playerid]][1], gCheckpoints[gCheckpoint[playerid]][2], gCheckpoints[gCheckpoint[playerid] + 1][0], gCheckpoints[gCheckpoint[playerid] + 1][1], gCheckpoints[gCheckpoint[playerid] + 1][2], 12.0);
//onplayerenterracecheckpoint
if(gCheckpoint[playerid] == MAX_CHECKPOINTS - 2) { checkpointtype = 1; }
if(gCheckpoint[playerid] != MAX_CHECKPOINTS - 1)
{
SetPlayerRaceCheckpoint(playerid, checkpointtype, gCheckpoints[gCheckpoint[playerid]][0], gCheckpoints[gCheckpoint[playerid]][1], gCheckpoints[gCheckpoint[playerid]][2], gCheckpoints[gCheckpoint[playerid] + 1][0], gCheckpoints[gCheckpoint[playerid] + 1][1], gCheckpoints[gCheckpoint[playerid] + 1][2], 12.0);
Re: Checkpoint type. -
Jochemd - 25.09.2010
Since you entered 'checkpointtype is 1 it should see it as race checkpoint type 1. If you set it to '3' it would show the air checkpoint.
Re: Checkpoint type. -
Seven. - 25.09.2010
Emmh not exactly, Type 1 is the finish checkpoint.. :S
Re: Checkpoint type. -
[XST]O_x - 25.09.2010
pawn Код:
SetPlayerRaceCheckpoint(playerid, checkpointtype, gCheckpoints[gCheckpoint[playerid]][0], gCheckpoints[gCheckpoint[playerid]][1], gCheckpoints[gCheckpoint[playerid]][2], gCheckpoints[gCheckpoint[playerid] + 1][0], gCheckpoints[gCheckpoint[playerid] + 1][1], gCheckpoints[gCheckpoint[playerid] + 1][2], 12.0);
Do you have 'checkpointtype' defined somewhere? A redefinition of it to '3' would help.
Or simply- delete it and replace 'checkpointtype' with 3.
Re: Checkpoint type. -
Rachael - 25.09.2010
Air checkpoints 3-normal 4-finish
maybe you need to add another variable to denote that it is an air race, and if so, +3 to checkpoint type.