SA-MP Forums Archive
Checkpoint help - 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 help (/showthread.php?tid=249610)



Checkpoint help - Beginnercoder - 19.04.2011

Hello, how do I create checkpoints that when you walk into, you will die?


Re: Checkpoint help - park4bmx - 19.04.2011

SetPlayerCheckpoint

https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint


Re: Checkpoint help - Beginnercoder - 19.04.2011

Well I added were I want the checkpoint to be on this

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
but on this bit, how will it know which checkpoint it will respond as.
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerMoney(playerid, 1000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}



Re: Checkpoint help - nuriel8833 - 19.04.2011

Quote:
Originally Posted by Beginnercoder
Посмотреть сообщение
Well I added were I want the checkpoint to be on this

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1982.6150, -220.6680, -0.2432, 3.0);
    return 1;
}
but on this bit, how will it know which checkpoint it will respond as.
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerMoney(playerid, 1000);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
SA:MP has a limit of only 1 checkpoint per mod,so unless you have a streamer everything that will go into OnPlayerEnterCheckpoint will be shown in 1 checkpoint.
As for your question:

PHP код:
public OnPlayerSpawn(playerid)
{
    
SetPlayerCheckpoint(playerid1982.6150, -220.6680, -0.24323.0);
    return 
1;

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    
SetPlayerHealth(playerid,0);
    
DisablePlayerCheckpoint(playerid);
    return 
1