Checkpoint sizes do not "update"
#1

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;
}
Reply
#2

Known bug. Can't currently be fixed.
Reply
#3

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(playeridFloatcpxFloatcpyFloatcpzFloatrange)
{
    
DisablePlayerCheckpoint(playerid);
    
SetTimerEx("Newcheckpoint"250false"iffff"playeridcpxcpycpzrange);
}
forward Newcheckpoint(playeridFloatcpxFloatcpyFloatcpzFloatrange);
public 
Newcheckpoint(playeridFloatcpxFloatcpyFloatcpzFloatrange)
{
    
CPX[playerid] = cpx;
    
CPY[playerid] = cpy;
    
CPZ[playerid] = cpz;
    
SetPlayerCheckpoint(playeridcpxcpycpzrange);
    
CPH[playerid] = 1;
    return 
1;

Reply
#4

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(playeridFloatcpxFloatcpyFloatcpzFloatrange)
{
    
DisablePlayerCheckpoint(playerid);
    
SetTimerEx("Newcheckpoint"250false"iffff"playeridcpxcpycpzrange);
}
forward Newcheckpoint(playeridFloatcpxFloatcpyFloatcpzFloatrange);
public 
Newcheckpoint(playeridFloatcpxFloatcpyFloatcpzFloatrange)
{
    
CPX[playerid] = cpx;
    
CPY[playerid] = cpy;
    
CPZ[playerid] = cpz;
    
SetPlayerCheckpoint(playeridcpxcpycpzrange);
    
CPH[playerid] = 1;
    return 
1;

For 500-600 players I think it would be a bad idea.
Reply
#5

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.
Reply
#6

You can fix this bug by installing this include.
https://github.com/Open-GTO/sa-mp-fixes
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)