[QUESTION] Some information regarding Player and Vehicle update callbacks

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,808
[QUESTION] Some information regarding Player and Vehicle update callbacks
« on November 14th, 2014, 03:01 PM »
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

  • VC:MP Developer
  • oh god how did i get here im not good w computer
  • Posts: 1,127
[QUESTION] Re: Some information regarding Player and Vehicle update callbacks
« Reply #1, on November 15th, 2014, 06:28 PM »
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.

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,808
.

ysc3839

  • VC:MP Beta Tester
  • Posts: 622

Sk

  • Jr. Member
  • Posts: 67

.

  • VC:MP Beta Tester
  • .
  • Posts: 1,808
.