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 :)
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.
Thank you :)
See the wiki! http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Constants#Update_Type :)
ty ysc :)
Quote from: ysc3839 on Dec 13, 2014, 03:24 PMSee the wiki! http://wiki.vc-mp.org/wiki/Scripting/Squirrel/Constants#Update_Type :)
That's 20% of the answer and the full answer was already in the second post.