Checkpoint question - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Checkpoint question (
/showthread.php?tid=65951)
Checkpoint question -
nesty - 17.02.2009
hi, there
I want to create some checkpoints to teleport the player to an interior (for example (ls hq) i downloaded CPS and it works...
but if i enter the checkpoint and get teleported it disappeared forever? So i can only use the checkpoint one times? Has anybody an idea why that happens?
thx
Re: Checkpoint question -
Raux - 17.02.2009
Try making a permanent static checkpoint. It will appear as a checkpoint inside a checkpoint but it will stay. CreatePickup(id,type,x,y,z)
type = 1 will it make it stay forever. If that doesn't work, try type 23 instead.
Re: Checkpoint question -
nesty - 19.02.2009

Sry but i dont understand u because u can only use -1 (show the checkpoint for all players) or 0 (playerid). So if i change the first number nothing happens!
pawn Код:
cpBANKoutside = CreateCheckpoint(-1,2440.4365,114.3300,26.4767,1.0,40.0); //checkpoint streamer
someone can help pls?
Re: Checkpoint question -
nesty - 19.02.2009
ok here is my checkpoint script... the problem is that the checkpoint disappeared if i entered it!
pawn Код:
#include <cps> //checkpoint streamer system
pawn Код:
new cpBANKoutside;
new cpBANKinside;
pawn Код:
public OnPlayerConnect(playerid)
{
GameTextForPlayer(playerid,"lol",1,1);
ClearVars(playerid); //checkpoint streamer
SyncCheckpoints(playerid); //checkpoint streamer
return 1;
}
pawn Код:
//OnGameModeInit()
StartSystem(); //checkpoint streamer
pawn Код:
//OnGameModeInit()
cpBANKoutside = CreateCheckpoint(-1,2440.4365,114.3300,26.4767,1.0,40.0); //-1 = all players //checkpoint streamer
cpBANKinside = CreateCheckpoint(-1,246.7685,63.2321,1003.6406,1.0,40.0);
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid,streamid)
{
if(streamid == cpBANKoutside)
{
GameTextForPlayer(playerid,"You entered checkpoint outside!",3000,5);
SetPlayerPos(playerid,246.7840,64.7052,1003.6406);
SetPlayerInterior(playerid,6);
}
else if(streamid == cpBANKinside)
{
GameTextForPlayer(playerid,"You entered checkpoint inside!",3000,5);
SetPlayerPos(playerid,2445.4365,114.3300,26.4767);
SetPlayerInterior(playerid,0);
}
return 1;
}
hope u can help me
Re: Checkpoint question -
nesty - 19.02.2009
solved (lol)