12.08.2013, 16:13
(
Последний раз редактировалось Jamould; 15.08.2013 в 12:20.
)
Hi there,
I was wondering if there's such a thing as a bag, briefcase, crate or box system.
Much like the trunk sytem found in Roleplay gamemodes,
but instead of attaching it to a Vehicle,
it's attached to an object.
I've been trying to do it, by looking at the Trunk code and
making similiar callbacks for the objects/bags.
Objects are loaded and saved in Objects.cfg via array ObjectInfo, with objModel, objPos_x,
objPos_y, objPos_z, with callbacks LoadObjects() and OnObjectUpdate()
(managed to get objects to load, but saving doesn't seem to be working)
Contents of the bag are saved and loaded in bag.cfg in the same way the Trunk system is.
Callbacks are SaveBag() and LoadBag()
Created callback CheckPlayerDistanceToObject, which is the same as CheckPlayerDistanceToVehicle, except instead of GetVehiclePos it's GetObjectPos
I'll post my code, when I get the chance
I was wondering if there's such a thing as a bag, briefcase, crate or box system.
Much like the trunk sytem found in Roleplay gamemodes,
but instead of attaching it to a Vehicle,
it's attached to an object.
I've been trying to do it, by looking at the Trunk code and
making similiar callbacks for the objects/bags.
Objects are loaded and saved in Objects.cfg via array ObjectInfo, with objModel, objPos_x,
objPos_y, objPos_z, with callbacks LoadObjects() and OnObjectUpdate()
(managed to get objects to load, but saving doesn't seem to be working)
Contents of the bag are saved and loaded in bag.cfg in the same way the Trunk system is.
Callbacks are SaveBag() and LoadBag()
Created callback CheckPlayerDistanceToObject, which is the same as CheckPlayerDistanceToVehicle, except instead of GetVehiclePos it's GetObjectPos
I'll post my code, when I get the chance