PDA

View Full Version : clearweaponcargo after respawn



matosinec
May 10 2012, 20:22
Ive been trying to do that for almost 3 hours and i dont know what else to do. On start vehicle gear menu is empty but after respawn its not empty.

Janez
May 10 2012, 20:44
Hi,

how do you respawn that vehicle?

If you are using simple vehicle respawn (http://forums.bistudio.com/showthread.php?76445-Simple-Vehicle-Respawn-Script&highlight=simple+vehicle+respawn) script you can insert something like this into vehicle init line:


clearWeaponCargo this; veh = [this, 30, 10, 0, TRUE, FALSE, "clearWeaponCargo this"] execVM "Scripts\vehicle.sqf"

with more commands you have to be careful with quotes:


clearWeaponCargo this; this addWeaponCargo ["M16A2",5]; veh = [this, 30, 0, 0, TRUE, FALSE, "clearWeaponCargo this; this addWeaponCargo ['M16A2',5]"] execVM "Scripts\vehicle.sqf"

matosinec
May 10 2012, 21:00
It works, I already tried like that but it didnt work so i probably made some kind of mistake. Thanks.