Adding data to the mission .sqm

BillyA

Member
I've seen people get things to spawn in server using the .sqm. weapons, ammo, etc.


Just wondering, where do I place this data in the .sqm i have from the .sqf

example from my .sqf:

_vehicle_465 = objNull;
if (true) then
{
_this = createVehicle ["HeliHEmpty", [2243.3464, 15206.234, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
_vehicle_465 = _this;
_this setVehicleInit "myownholder = ""weaponholder"" createvehicle getpos this; myownholder addweaponcargo [""M4A1_AIM_SD_CAMO"",2];";
_this setPos [2243.3464, 15206.234, -6.1035156e-005];
};



Where would this data go in my mission.sqm?


Thanks.
 
make a file called "whatever.sqf" and add the code below then save it into a folder called Scripts.

Code:
//Always use  "if (isServer) then {" for first line.
 
if (isServer) then {
 
_vehicle_465 = objNull;
if (true) then
{
_this = createVehicle ["HeliHEmpty", [2243.3464, 15206.234, -6.1035156e-005], [], 0, "CAN_COLLIDE"];
_vehicle_465 = _this;
_this setVehicleInit "myownholder = ""weaponholder"" createvehicle getpos this; myownholder addweaponcargo [""M4A1_AIM_SD_CAMO"",2];";
_this setPos [2243.3464, 15206.234, -6.1035156e-005];
};
};

Once you've done that then at the bottom of your init.sqf file add the following line...

Code:
[] ExecVM "Scripts\whatever.sqf";

Re-Pack pbo and you should be good.
 
Back
Top