How to > Add Checkpoint > SetPlayerPos
#1

hello guys i really need help with on player enter Checkpoint SetPlayerPos to Interior i want I Give you the codes Plesae Help me

Код:
(2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0); //
Here i want put the Checkpoint and Here the Interior id OnPlayerEnterCheckpoint then when player enter checkpoint SetPlayerPos to here

Код:
1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
Plesae Help me and i will Rep you
Reply
#2

So if you want to create checkpoint on playe spawn it would go like this
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Reply
#3

Quote:
Originally Posted by Micko123
Посмотреть сообщение
So if you want to create checkpoint on playe spawn it would go like this
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
You would also need to check if that is the correct Checkpoint you entered, you can use Incognito's Dynamic Checkpoints for that.
Код:
new CP;
CP = CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1);

public OnPlayerEnterDynamicCP(playerid, checkpointid)
Reply
#4

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
You would also need to check if that is the correct Checkpoint you entered[..]
Only 1 checkpoint can be seen at a time when using SetPlayerCheckpoint function.

Quote:
Originally Posted by Micko123
Посмотреть сообщение
So if you want to create checkpoint on playe spawn it would go like this
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
This will give warnings for wrong number of arguments. You only need the necessary info such as playerid, x, y, z for player's position and playerid, x, y, z and size for the checkpoint.

---

You will also need to set the interior along with the position otherwise the player will fall off the sky.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Only 1 checkpoint can be seen at a time when using SetPlayerCheckpoint function.



This will give warnings for wrong number of arguments. You only need the necessary info such as playerid, x, y, z for player's position and playerid, x, y, z and size for the checkpoint.

---

You will also need to set the interior along with the position otherwise the player will fall off the sky.
He gave us those coords. I just used what he gave us
Reply
#6

Quote:
Originally Posted by Micko123
Посмотреть сообщение
So if you want to create checkpoint on playe spawn it would go like this
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0);
    return 1;
}
 
public OnPlayerEnterCheckpoint(playerid)
{
    SetPlayerPos(1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
    DisablePlayerCheckpoint(playerid);
    return 1;
}
Код:
warning 213: tag mismatch
When i press
Код:
SetPlayerPos(1132.9397,-10.3007,1000.6797);
Reply
#7

Код:
SetPlayerPos(playerid, 1132.9397,-10.3007,1000.6797);
Reply
#8

i forgot playerid in line sry
Reply
#9

Thank you Guys Worked But how i can make if i want make other one?

I Rep every one help me
Reply
#10

Same way.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)