08.02.2017, 08:19
Hi, I have recently come by a problem. I was creating a job for my RPG gamemode, and I have to use checkpoints.
What happens:
I create at first a checkpoint with size 3.5, and in OnPlayerEnterCheckpoint, I create one with size 1.0. The second checkpoint always keeps the size of the first (ONLY THE CILINDER, ONPLAYERENTERCHECKPOINT IS CALLED FOR THE CORRECT SIZE).
Some code:
What happens:
I create at first a checkpoint with size 3.5, and in OnPlayerEnterCheckpoint, I create one with size 1.0. The second checkpoint always keeps the size of the first (ONLY THE CILINDER, ONPLAYERENTERCHECKPOINT IS CALLED FOR THE CORRECT SIZE).
Some code:
Код:
SetPlayerCheckpointEx(playerid, dumpsterInfo[JobObject[playerid]][dumpster_X2], dumpsterInfo[JobObject[playerid]][dumpster_Y2], dumpsterInfo[JobObject[playerid]][dumpster_Z2], 1.0);
Код:
public SetPlayerCheckpointEx(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range)
{
DisablePlayerCheckpoint(playerid);
CPX[playerid] = cpx;
CPY[playerid] = cpy;
CPZ[playerid] = cpz;
SetPlayerCheckpoint(playerid, cpx, cpy, cpz, range);
CPH[playerid] = 1;
return 1;
}


