OnPlayerUpdate not being called when towing trailer
#1

This is really annoying, because I have a trucking mission and I cancel the mission if players pause. If they sit still for a few seconds it will kick them, as OnPlayerUpdate isn't being called when they are stationary. I tried to record it with FRAPS, but when FRAPS is recording it doesn't happen, so perhaps it is FPS based. This really needs to be fixed though, because it's causing a lot of problems, not just for me for others too. I tested using this code:

pawn Код:
new opu_updates[MAX_PLAYERS];

public OnPlayerUpdate(playerid)
{  
    opu_updates[playerid]++;
    new updatestring[24];
    format(updatestring, sizeof(updatestring), "~W~UPDATES: ~Y~%i", updates[playerid]);
    GameTextForPlayer(playerid, updatestring, 3000, 3);
    return 1;
}
After attaching a trailer (either manually or with AttachTrailerToVehicle), I didn't move and the updates stopped, until I moved again.
Reply
#2

Only seems to happen if you don't move

For now you can use SetVehicleVelocity before you mark them as away/alt-tabbed
It will call OnPlayerUpdate if they are still ingame

pawn Код:
new Float:X, Float:Y, Float:Z;
new vid=GetPlayerVehicleID(playerid);
GetVehicleVelocity(vid,X,Y,Z);
SetVehicleVelocity(vid,X,Y,Z+0.05);
Reply
#3

Could this be fixed in 0.3e?
Reply
#4

There is also the bug that the trailer becomes attached and disattached successively unlimited times if you drive the truck.
Reply
#5

For other players? Yeah that's a sync bug, but not really important.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)