Multiple Checkpoint
#1

So it's basically about interior, but the thing is, I am not using the "Gta SA Interiors", I made, used mapped interiors, customs one. I just want to make a checkpoint like for example, I have a checkpoint outside ammunation, if a user typed "/enter" they'll be teleported to the mapped area, and same for /exit.


How exactly do I do that?
Reply
#2

I would recommend using the streamer plugin for creating checkpoints if you're not already.
https://sampforum.blast.hk/showthread.php?tid=102865

Then you can use:
OnPlayerCommandText OR if you're using a command processor like ZCMD or YCMD, use their functionality. (e.g. CMD:enter)
IsPlayerInDynamicCP OR IsPlayerInRangeOfPoint to check if the player is within range of the checkpoint.
SetPlayerPos to set the player's position.
SetPlayerInterior to set the player's interior, if the map requires it.
SetPlayerVirtualWorld if you want the players to not be visible to other players who aren't in the same interior.

Example:
PHP код:
CMD:enter(playeridparams[])
{
    if(
IsPlayerInDynamicCP(playeridInteriorCheckpointEntry)) // Player is in the entry checkpoint
    
{
        
SetPlayerPos(playerid100.0200.0300.0); // Teleport the player to the coordinates of your custom map.
        
SetPlayerInterior(playerid4); // If the player requires their interior to be changed, use SetPlayerInterior.
        
SetPlayerVirtualWorld(playerid16); // Change the player's virtual world if required.
    
}
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)