OnPlayerEnterCheckpoint job
#1

Ok guys hi,

Example: If i have an object box in my hands and i need put it on red checkpoint, how i can do that when i enter in this checkpoint object will be shown on the ground, what i have to do set positions or ? Any example +REP if helped
Reply
#2

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

I dont get it!

This is my coo (2066.1118,-1991.9330,13.5469,176.4049)

So now when i enter in this Checkpoint object must be on ground!
Reply
#4

Subtract like 1.0 from the Y coordinate and create the object at that position.
Reply
#5

Maybe this is what you want. First of all make some CMD like eh... /job like this one :

PHP код:
CMD:job(playeridparams[])
{
    
SetPVarInt(playerid"Checkpoint"1);
    
SetPlayerCheckpoint(playerid2066.1118,-1991.9330,13.54693.0);

Then if player enter checkpoint at the coordinate, disable the checkpoint like this :

PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
GetPVarInt(playerid"Checkpoint"))
    {
                
//Add another function if you want
        
DisablePlayerCheckpoint(playerid);
        
DeletePVar(playerid"Checkpoint");
    }
    return 
1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)