09.05.2008, 11:08
Heres a simple but useful checkpoint handler I just whipped up (Only took me 15 minutes, so if there are any problems, slap me and I'll fix them)
Remember, this is a checkpoint handler, not a streamer! Basically, this adds an additional parameter to checkpoints, being checkpointid, and returns the id allowing you to assign variables to each checkpoint.
Functions:
CreatePlayerCheckpoint(playerid,Float
,Float:y,Fl oat:z,Float
ize); - Creates a checkpoint and shows it for the player.
RemovePlayerCheckpoint(playerid) - More or less the same as DisablePlayerCheckpoint(playerid), only, use this instead.
IsPlayerInCp(playerid,checkpointid) - Returns 1 if a player is in the checkpoint, and -1 if the player is not!
Callbacks:
OnPlayerCheckpoint(playerid,checkpointid)
OnPlayerExitCheckpoint(playerid,checkpointid)
For installation, Read the readme!
Download:
http://bin.sa-mp.nl/f/gCheckpoint.zip
Example Usage:
Remember, this is a checkpoint handler, not a streamer! Basically, this adds an additional parameter to checkpoints, being checkpointid, and returns the id allowing you to assign variables to each checkpoint.
Functions:
CreatePlayerCheckpoint(playerid,Float


RemovePlayerCheckpoint(playerid) - More or less the same as DisablePlayerCheckpoint(playerid), only, use this instead.
IsPlayerInCp(playerid,checkpointid) - Returns 1 if a player is in the checkpoint, and -1 if the player is not!
Callbacks:
OnPlayerCheckpoint(playerid,checkpointid)
OnPlayerExitCheckpoint(playerid,checkpointid)
For installation, Read the readme!
Download:
http://bin.sa-mp.nl/f/gCheckpoint.zip
Example Usage:
Code:
new Export; OnPlayerSpawn(playerid) { Export = CreatePlayerCheckpoint(playerid,4231.42,3747.0,3212.4,5); return 1; } OnPlayerCheckpoint(playerid,checkpointid) { if(checkpointid == Export) { //Do somthing! } return true; }