open.mp forum
[Pawn] playerid is 0-based, but vehicleid is 1-based, what gives? - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3)
--- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10)
--- Thread: [Pawn] playerid is 0-based, but vehicleid is 1-based, what gives? (/showthread.php?tid=708)



playerid is 0-based, but vehicleid is 1-based, what gives? - Aerotactics - 2019-07-10

Title.


RE: playerid is 0-based, but vehicleid is 1-based, what gives? - Cada - 2019-07-10

it can handle various error or not expected flow with 0, INVLID_VEHICLE_ID.

not created for train in ground, invalid model, limit reached, etc...





so, i think that player error is not various as vehicle. so, 0 is used for player not error handling.


RE: playerid is 0-based, but vehicleid is 1-based, what gives? - Y_Less - 2019-07-13

No real reason. They should be consistent, but they aren't.


RE: playerid is 0-based, but vehicleid is 1-based, what gives? - Freaksken - 2019-07-14

Objects and player objects also start at ID 1.