[QUESTION] Some information regarding Player and Vehicle update callbacks

Started by ., Nov 14, 2014, 03:01 PM

Previous topic - Next topic

.

I find my self working with the Player and Vehicle update callbacks from the SDK and I notice I have no information about them other than the one I could find in the Squirrel plugin.

First of all. On what kind of updates are these functions called. Just a few like: Position, Health, Armour, Weapon etc. Or they're called on all kinds of updates.

Does the updated type id mean anything?

I've noticed the following:

When the player is out of a vehicle is always 0. When the player is in a vehicle is always 2.
When the vehicle doesn't have a driver is always 1. When the vehicle has a driver is always 0.


I'm a bit lost and if someone could provide some inside information I'd be grateful. Thank you :)
.

Stormeus

The type IDs for OnPlayerUpdate are as follows.

Normal/On Foot: 0
Aiming/Firing Weapon: 1
Driver: 2
Passenger: 3

The type IDs for OnVehicleUpdate are as follows.

Driver: 0
Other (driverless sync): 1
Position: 2
Health: 4
Colour: 5
Rotation: 6

The events will always (or almost always) fire when something has changed. Player updates may fire even while idle when receiving sync packets from them. Vehicle updates will never fire if a vehicle is streamed to no one on the server.

.

.



.

.