Start dedicated server
log in
on the CLIENT execute
playerServer = player;
publicVariable "playerServer";
"test" addPublicVariableEventHandler {hint str (_this select 1)};
create helicopter on ther SERVER
heli = "B_Heli_Transport_01_camo_F" createvehicle position playerServer;
Get in cargo for example then execute on the SERVER
test = assignedVehicleRole playerServer;
publicVariable "test";
hint shows []
now execute the same on the CLIENT
hint str assignedVehicleRole player;
hint shows ["Cargo"]
Now get out of the heli and change helicopter locality to client, execute on the SERVER
heli setOwner owner playerServer;
Get in Cargo seat again and execute on the SERVER
test = assignedVehicleRole playerServer;
publicVariable "test";
hint now shows ["Cargo"] and it works for any seat
NOTE: Getting in driver seat does not immediately make assignedVehicleRole work on the server even though the locality of the heli changed. You need to get out and hget in before it starts working. The same happen if you manually change locality while player is in cargo seat for example. It is not enough for the heli to be local to player, change of locality has to happen when player is out of the heli.