Checkpoint sizes do not "update" -
Donboo - 08.02.2017
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:
Код:
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;
}
Re: Checkpoint sizes do not "update" -
Vince - 08.02.2017
Known bug. Can't currently be fixed.
Re: Checkpoint sizes do not "update" -
PowerPC603 - 08.02.2017
You can try to set the new checkpoint via a timer.
I've experienced problems as well using a clickable textdraw menu by hiding all textdraws and the re-opening them in the same function.
The menu stays closed.
I had to re-open the menu through the use of a timer.
Maybe the same happens with checkpoints, where the game keeps the size of the checkpoint if it's recreated at once.
PHP код:
public SetPlayerCheckpointEx(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range)
{
DisablePlayerCheckpoint(playerid);
SetTimerEx("Newcheckpoint", 250, false, "iffff", playerid, cpx, cpy, cpz, range);
}
forward Newcheckpoint(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range);
public Newcheckpoint(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range)
{
CPX[playerid] = cpx;
CPY[playerid] = cpy;
CPZ[playerid] = cpz;
SetPlayerCheckpoint(playerid, cpx, cpy, cpz, range);
CPH[playerid] = 1;
return 1;
}
Re: Checkpoint sizes do not "update" -
Donboo - 08.02.2017
Quote:
Originally Posted by PowerPC603
You can try to set the new checkpoint via a timer.
I've experienced problems as well using a clickable textdraw menu by hiding all textdraws and the re-opening them in the same function.
The menu stays closed.
I had to re-open the menu through the use of a timer.
Maybe the same happens with checkpoints, where the game keeps the size of the checkpoint if it's recreated at once.
PHP код:
public SetPlayerCheckpointEx(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range)
{
DisablePlayerCheckpoint(playerid);
SetTimerEx("Newcheckpoint", 250, false, "iffff", playerid, cpx, cpy, cpz, range);
}
forward Newcheckpoint(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range);
public Newcheckpoint(playerid, Float: cpx, Float: cpy, Float: cpz, Float: range)
{
CPX[playerid] = cpx;
CPY[playerid] = cpy;
CPZ[playerid] = cpz;
SetPlayerCheckpoint(playerid, cpx, cpy, cpz, range);
CPH[playerid] = 1;
return 1;
}
|
For 500-600 players I think it would be a bad idea.
Re: Checkpoint sizes do not "update" -
PowerPC603 - 13.02.2017
Are all checkpoints resized for all players at once?
Or player per player?
If it's player per player (when they enter a checkpoint for example), it shouldn't matter.
I guess not all 500 players will enter their checkpoint at the same time.
Re: Checkpoint sizes do not "update" -
Sabur - 13.02.2017
You can fix this bug by installing this include.
https://github.com/Open-GTO/sa-mp-fixes