15.09.2013, 17:53
Hello all, how I can make repeating checkpoint, such as I enter on the checkpoint and automatically appear another checkpoint. Sorry for my bad english.
enum CP_DATA
{
Float: CP_X,
Float: CP_Y,
Float: CP_Z
};
new
CP[ 50 ][ CP_DATA ],
Player_CP[ MAX_PLAYERS ]
;
// OnGameModeInit: assign some coordinates to them.
// An example (random coordinates)
CP[ 0 ][ CP_X ] = 568.4641;
CP[ 0 ][ CP_Y ] = 688.4468;
CP[ 0 ][ CP_Z ] = 518.4441;
CP[ 1 ][ CP_X ] = 988.4641;
CP[ 1 ][ CP_Y ] = 641.4468;
CP[ 1 ][ CP_Z ] = 546.4441;
// OnPlayerConnect: reset it.
Player_CP[ playerid ] = -1;
// Where you set the FIRST checkpoint:
Player_CP[ playerid ] = 0;
// OnPlayerEnterRaceCheckpoint (I guess for racing system)
Player_CP[ playerid ]++;
new
cp = Player_CP[ playerid ]
;
SetPlayerRaceCheckpoint( playerid, CP[ cp ][ CP_X ], CP[ cp ][ CP_Y ], CP[ cp ][ CP_Z ], CP[ cp ][ CP_X + 1 ], CP[ cp ][ CP_Y + 1 ], CP[ cp ][ CP_Z + 1 ], 9 );