(2090.0127,1514.6372,10.8203,221.7098,0,0,0,0,0,0); //
1132.9397,-10.3007,1000.6797,0.2041,0,0,0,0,0,0);
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; }
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; } |
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)
You would also need to check if that is the correct Checkpoint you entered[..]
|
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; } |
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. |
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
SetPlayerPos(1132.9397,-10.3007,1000.6797);
SetPlayerPos(playerid, 1132.9397,-10.3007,1000.6797);