How to create multiple checkpoints (Streamer) -
Deroxi - 26.05.2017
Before you link me with tutorials, I do know how to make checkpoints. I want to make a robbing system and I do have it all figured out tho (with 1 store yet). But there are (for example) multiple Burger Shots in LS, does that mean I have to make a checkpoint (entrance, exit, robbing) for every single store or is there a simplier way?
Re: How to create multiple checkpoints (Streamer) -
Kane - 26.05.2017
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
Re: How to create multiple checkpoints (Streamer) -
Deroxi - 26.05.2017
But that would mean that I still need to define every single BurgerShot. And set each checkpoint to teleport the player to a seperate burgershot
Re: How to create multiple checkpoints (Streamer) -
Vince - 26.05.2017
The interior is always the same so you only need one checkpoint. You can keep track of which location a player entered by using virtual worlds (assuming custom EnEx system).
Re: How to create multiple checkpoints (Streamer) -
Deroxi - 26.05.2017
But that would still mean I need to define every single entrance?