Hi, i have one problem with my script i have created a NPC in SQF but i would create init on this i have created init, but doesn't work in JIP and Multiplayer.
if (true) then
{
_obj_9 = _group_civ_3 createUnit ["C_man_1", [1457.5707, 7614.7373, 0], [], 0 ,"NONE"];
// this is VERY dirty and only used because I don't want to create
// arrays for vehicles, units and stuff to check if the classname
// is a vehicle, an unit, and so on. this just works.
// what it does is if the unit is not alive after creation (because it should be a manned vehicle)
// it will be created with createVehicle and manned with the BIS_fnc_spawnCrew function.
if(!alive _obj_9) then {
_obj_9 = createVehicle ["C_man_1", [1457.5707, 7614.7373, 0], [], 0 ,"NONE"];
[_obj_9, _group_civ_3] call BIS_fnc_spawnCrew;
};
this = _obj_9;
[] call compile "this enableSimulation false; this allowDamage false; this addAction[""Vendeur de Voitures"",ZRX_fnc_vehicleShopMenu,[""civ_car"",civilian,[""civ_car_1"",""civ_car_1_1""],""civ"",""Bruce's New & Used Auto's""]]; this setVariable[""realname"", ""Car Shop""];";
_obj_9 setDir -178.83501;
_obj_9 setUnitAbility 0.60000002;
_obj_9 setRank "PRIVATE";
if(true) then { _group_civ_3 selectLeader _obj_9};
_createdUnits pushBack _obj_9;
};
init in [] call compile but doesn't work in multiplayer because if i execute in initserver i have NPC but don't have allowdamage false or addaction on this...
and if i execute in initplayerlocal in have createvehicle and spawn 1 NPC per player but have action for NPC spawned by the player...
Sorry for my english, i'm french.
NiiRoZz