Posts: 277
Threads: 19
Joined: Sep 2013
I've never used checkpoints before, but you won't get teleported into LVPD when you enter the checkpoint?
pawn Код:
public OnCheckpointEnter(playerid, checkpointid)
{
VerifyCheckpoint(playerid);
switch(checkpointid)
{
case LVPD:
{
SetPlayerPos(playerid, 238.66, 138.68, 1003.02);
SetPlayerInterior(playerid, 3);
SetPlayerVirtualWorld(playerid, 1);
return 1;
}
}
return 1;
}
Posts: 10,066
Threads: 38
Joined: Sep 2007
Reputation:
0
How is this callback called? I hope you realize you can't just make stuff up?
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Defining a checkpoint ID variable as 'LVPD' is terrible naming. By looking at that variable name, how on earth are you meant to know what it's for? At least prefix it with CP_ for checkpoint...
Posts: 2,938
Threads: 162
Joined: May 2010
Show the VerifyCheckpoint checkpoint function and the create checkpoint line / code
Posts: 277
Threads: 19
Joined: Sep 2013
I'm using this.
https://sampforum.blast.hk/showthread.php?tid=70963
This is the VerifyCheckpoint function (I think) in the include.
pawn Код:
stock VerifyCheckpoint(__playerid){
if(_p_VisibleCheckpoint[__playerid] >= 0){
OnCheckpointEnter(__playerid, _checkpoints[_p_VisibleCheckpoint[__playerid]][_chp_id]);
return 1;
}
return 0;
}
stock VerifyCheckpointe(__playerid){
if(_p_VisibleCheckpoint[__playerid] >= 0){
OnCheckpointEXIT(__playerid, _checkpoints[_p_VisibleCheckpoint[__playerid]][_chp_id]);
return 1;
}
return 0;
}
And this is the create checkpoint.
pawn Код:
public OnGameModeInit()
{
CreateCheckpoint(GLOBAL_OWNER_ID, LVPD, 2287.0176,2432.5933,10.8203, 1.0);
SetCheckpointInterior(LVPD, 0);
return 1;
}
Posts: 277
Threads: 19
Joined: Sep 2013
Posts: 478
Threads: 4
Joined: Jul 2010
Reputation:
0
VerifyCheckpoint belongs to or needs to be in OnPlayerEnterCheckpoint and not OnCheckpointEnter.
Posts: 277
Threads: 19
Joined: Sep 2013
I already have that.
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
VerifyCheckpoint(playerid);
return 1;
}