How to create multiple checkpoints (Streamer)
#1

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?
Reply
#2

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(playeridparams[]){
      
DrawCheckpoint(playeridCHECKPOINT_GROCERY1234.567124.56752);
      
DrawCheckpoint(playeridCHECKPOINT_HARDWARE2244.567354.56727);
      
SendClientMessage(playerid, -1"Stores were marked on the GPS.");
      return 
1;
}
public 
OnPlayerEnterSpecialCheckpoint(playeridcpidextraid){
      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
Reply
#3

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
Reply
#4

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).
Reply
#5

But that would still mean I need to define every single entrance?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)