SA-MP Forums Archive
Interiors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Interiors (/showthread.php?tid=301917)



Interiors - Gooday - 06.12.2011

How i can add a checkpoind when you go in it you get teleported in a interior ?


Re: Interiors - Stigg - 06.12.2011

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
https://sampwiki.blast.hk/wiki/SetPlayerPos
https://sampwiki.blast.hk/wiki/SetPlayerInterior
https://sampwiki.blast.hk/wiki/InteriorIDs

Should help you get started.


Re: Interiors - MP2 - 06.12.2011

You need to use a streamer to have multiple checkpoints. I recommend Incognito's streamer plugin.

pawn Код:
new CP_LSPD;

public OnGameModeInit()
{
    CP_LSPD = CreateDynamicCheckpoint(...);
    return 1;
}

public OnPlayerEnterDynamicCheckpoint(playerid, checkpointid)
{
    if(checkpointid == CP_LSPD)
    {
        SetPlayerPos(playerid, x, y, z);
        SetPlayerFacingAngle(playerid, a);
        SetPlayerInterior(playerid, int);
    }
    return 1;
}
This is a template, it's not a working code. It's not a copy and paste job.