12.02.2014, 12:35
(
Last edited by KubiPL; 13/02/2014 at 09:31 AM.
)
This is fixed.
UPDATED
I think this callback isn't woking well, sometimes it's going to update position (checked with getvehiclepos) when it's actually returning 0 in script.
Please, look at video and code:
[ame]http://www.youtube.com/watch?v=xr_PHQN0f9Q[/ame]
CODE:
Vehicle isn't respawned when cheater with CLEO (fck this..) throws it in others cars and veh get stucked.
To dev team - please see also this suggestion (http://forum.sa-mp.com/showpost.php?...postcount=1315)
Quote:
Why this callback isn't called, when there's no players around and one player pushes cars? In previous version this worked well, but now it's called when there is some players. Also when player push car away from car old position, this isn't sent to server and when you get vehicle position server-side, it isn't changed. Look at video below. Code: Code:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z) { static Float:x, Float:y, Float:z, str[32]; GetVehiclePos(vehicleid, x, y, z); SendClientMessage(playerid, -1, "Veh update"); if(VectorSize(x-new_x, y-new_y,z-new_z) > 1.0) { format(str, 32, "Unocc: veh %d return 0", vehicleid); SendClientMessage(playerid, -1, str); return 0; } return 1; } http://www.youtube.com/watch?v=4C8trLQXplw |
I think this callback isn't woking well, sometimes it's going to update position (checked with getvehiclepos) when it's actually returning 0 in script.
Please, look at video and code:
[ame]http://www.youtube.com/watch?v=xr_PHQN0f9Q[/ame]
CODE:
Code:
public OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z) { static Float:x, Float:y, Float:z; GetVehiclePos(vehicleid, x, y, z); if(VectorSize(x-new_x, y-new_y,z-new_z) > 0.4) { SetVehicleToRespawn(vehicleid); return 0; } return 1; }
To dev team - please see also this suggestion (http://forum.sa-mp.com/showpost.php?...postcount=1315)