Checkpoint help
#1

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

SetPlayerCheckpoint

https://sampwiki.blast.hk/wiki/Function:SetPlayerCheckpoint
Reply
#3

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;
}
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)