https://pastebin.com/1zrSvQZ5
Mmartin made a multiple checkpoint streamer in 2013, pastebin link is above. It isn't on the SAMP forums though.
Installation: All you need to do is to include the file and call the init function in your OnGameModeInit (or you can change the Init function to a hook if you use y_hooks):
PHP код:
CallLocalFunction("Checkpoint_Init", "");
Use: With checkpoint.pwn you're able to set up multiple checkpoints on player's screen with unique extraid's. Example of a simple code:
PHP код:
#define CHECKPOINT_GROCERY 1
#define CHECKPOINT_HARDWARE 2
CMD:store(playerid, params[]){
DrawCheckpoint(playerid, CHECKPOINT_GROCERY, 1234.567, 124.567, 52);
DrawCheckpoint(playerid, CHECKPOINT_HARDWARE, 2244.567, 354.567, 27);
SendClientMessage(playerid, -1, "Stores were marked on the GPS.");
return 1;
}
public OnPlayerEnterSpecialCheckpoint(playerid, cpid, extraid){
if(extraid == CHECKPOINT_GROCERY){
SendClientMessage(playerid, -1, "Welcome to grocery store.");
}else if(extraid == CHECKPOINT_HARDWARE){
SendClientMessage(playerid, -1, "Welcome to hardware store.");
}
ClearAllCheckpoints(playerid);
return 1;
}
Pros: Multiple checkpoints shown at once, extra id's, support of worlds/interiors, ...
Cons: Can't set radius of the exact checkpoints, radius parameter only works for detecting of OnPlayerEnterSpecialCheckpoint