Grahame Posted May 23, 2018 Report Share Posted May 23, 2018 Okay... it's post-Apocalypse... you really need a cigarette... And they can be rare loot ... worth a lot in a trade, but how do you add them to an A3E server? Easy, follow these easy steps. (1) Add the Immersion (I always preferred it when it was Murshun... but... meh) Cigarettes mod to your server https://steamcommunity.com/sharedfiles/filedetails/?id=753946944 (2) You need to permission some functions so others can see the smoke from your cigarettes. Add class murshun_cigs_fnc_start_cig { allowedTargets=0; }; class murshun_cigs_fnc_start_cig_your { allowedTargets=0; }; class murshun_cigs_fnc_start_cig_his { allowedTargets=0; }; class murshun_cigs_lighter_01 { allowedTargets=0; }; class murshun_cigs_matches_01 { allowedTargets=0; }; class murshun_cigs_matches_02 { allowedTargets=0; }; class murshun_cigs_fnc_anim { allowedTargets=0; }; class murshun_cigs_fnc_smoke { allowedTargets=0; }; to epoch_config/Configs/CfgRemoteExec.hpp in your mission file. (3) Optional: if you enforce the use of a lighter to light fires then change lines 30-38 in epoch_code/compile/interface_event_handlers/EPOCH_handleUIActions.sqf from case (_actionName isEqualTo 'FireInflame'): { if!('lighter_epoch' in magazines player) then { _msg = 'You need a lighter'; _blocked = true; }else{ [player,'lighter_epoch',-1] call EPOCH_usedItemRepack; //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; }; }; to: case 'FireInflame': { if (["CfgEpochClient", "ActionFireOnLighter", true] call EPOCH_fnc_returnConfigEntryV2) then { // New code to handle Murshun fire sources - lighters and matches if ('murshun_cigs_lighter' in magazines player) then { [player,'murshun_cigs_lighter',-1] call EPOCH_usedItemRepack; //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; } else { if ('murshun_cigs_matches' in magazines player) then { [player,'murshun_cigs_matches',-1] call EPOCH_usedItemRepack; //[_actionObj] remoteExec ['EPOCH_server_addToFireSystem',2]; } else { _msg = 'You need matches or a lighter'; _blocked = true; }; }; }; }; (4) Now you need to add the addactions every time the player logs in so that they can take a cigarette out and light it, or light someone else's. Create a file called initPlayerLocal.sqf in the root of your mission file that contains the following (if you already have one then just add the four addactions to it): if (!isDedicated and hasInterface) then { waitUntil {alive vehicle player}; waitUntil {typeOF player != "VirtualMan_EPOCH"}; uisleep 15; // Add Murshun Actions to the scrollwheel player addAction [localize "STR_murshun_cigs_start_cig", {params ["_target", "_caller"];[_caller] spawn murshun_cigs_fnc_start_cig_your}, nil, 0, false, true, "", "if (_target != player) exitWith {false}; ((goggles _this) in murshun_cigs_cigsArray) and (!(_this getVariable ['murshun_cigs_cigLitUp', false]))", 5, false]; player addAction [localize "STR_murshun_cigs_stop_cig", {params ["_target", "_caller"];[_caller] spawn murshun_cigs_fnc_stop_cig}, nil, 0, false, true, "", "if (_target != player) exitWith {false}; ((goggles _this) in murshun_cigs_cigsArray) and ((_this getVariable ['murshun_cigs_cigLitUp', false]))", 5, false]; player addAction [localize "STR_murshun_cigs_take_cig_from_pack", {params ["_target", "_caller"];[_caller] spawn murshun_cigs_fnc_take_cig_from_pack}, nil, 0, false, true, "", "if (_target != player) exitWith {false}; 'murshun_cigs_cigpack' in (magazineCargo uniformContainer player)", 5, false]; player addAction [localize "STR_murshun_cigs_start_someones_cig", {params ["_target", "_caller"];[cursorObject, _caller] spawn murshun_cigs_fnc_start_cig_his}, nil, 0, false, true, "", "if !(cursorObject isKindOf 'Man') exitWith {false}; ((goggles cursorObject) in murshun_cigs_cigsArray) && (!(cursorObject getVariable ['murshun_cigs_cigLitUp', false])) && (alive cursorObject)", 5, false]; }; Finally just add the following classes into your trader price lists (and spawn them as rare Epoch and mission loot as you'd like): class murshun_cigs_cigpack { price = 100; }; // Beautiful, wonderful Murshun cigarettes, pack of 20 class murshun_cigs_matches { price = 5; }; // Pack of matches class murshun_cigs_lighter { price = 20; }; // Zippo class immersion_pops_poppack { price = 5; }; // Lollipops And remove the Epoch lighter (which won't work with Murshun without a client side preinit function... That's it. RePBO your mission file and upload to your server... Tarabas 1 Link to comment Share on other sites More sharing options...
Tarabas Posted May 24, 2018 Report Share Posted May 24, 2018 Mine is cheap and dirty, but without mod: Connect script: init.sqf blaze_it = compileFinal preprocessFileLineNumbers "addons\blazeit.sqf"; Bring the smoke: addons/blazeit.sqf disableUserInput true; closeDialog 0; hint "...that makes me feel alright!"; _smoke = createVehicle ["SmokeShell", position player, [], 0, "NONE"]; _smoke attachTo [player, [-0.03,0,0.7]]; uisleep 40; disableUserInput false; make Action Menu (Press Space) work+connect with Hemp \epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp class smoke { condition = "!dyna_inVehicle && InSafeZone"; action = "if !('ItemKiloHemp' in magazines player) exitwith {['Get atleast one kilo of hemp to smoke...who needs less?',5] call Epoch_Message;};[] spawn{ player playMove 'amovpsitmstpsnonwnondnon_smoking';uisleep 2;call blaze_it;['Great stuff ...',5] call Epoch_Message;0.9 call epoch_setDrunk;player removeitem 'ItemKiloHemp';};"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa"; tooltip = "Smoke Weed"; }; Grahame 1 Link to comment Share on other sites More sharing options...
Grahame Posted May 24, 2018 Author Report Share Posted May 24, 2018 Nice @TarabasThe advantage of the mod is the cigarette models and lighter and matches (which are fully working magazines). Link to comment Share on other sites More sharing options...
Tarabas Posted May 24, 2018 Report Share Posted May 24, 2018 That's truly cooler, yes (At least mine gives more sence to the hempplants ;) )... maybe they would be not that hard to model for someone in the community and add to Epochmod vanilla than. Self rollen ones would be nice aswell ;) Link to comment Share on other sites More sharing options...
Grahame Posted May 24, 2018 Author Report Share Posted May 24, 2018 I'll find the script I modded from A2 to A3 for visual and animation effects specifically for weed smoking if you'd like. Basically it was the old A2 one with just the player animations changed (since the A2 ones don't exist in A3). Worked pretty well, rolling around on the ground with psychedelic visual effects Tarabas 1 Link to comment Share on other sites More sharing options...
Tarabas Posted May 24, 2018 Report Share Posted May 24, 2018 Sounds awesome... yes please, if you find it :) Edit: On my version the "stoned"-effect (drunk) just shows up for 2 seconds and go away then again. idk why Link to comment Share on other sites More sharing options...
Sneer Posted May 25, 2018 Report Share Posted May 25, 2018 On 5/24/2018 at 9:56 AM, Tarabas said: Mine is cheap and dirty, but without mod: Connect script: init.sqf blaze_it = compileFinal preprocessFileLineNumbers "addons\blazeit.sqf"; Bring the smoke: addons/blazeit.sqf disableUserInput true; closeDialog 0; hint "...that makes me feel alright!"; _smoke = createVehicle ["SmokeShell", position player, [], 0, "NONE"]; _smoke attachTo [player, [-0.03,0,0.7]]; uisleep 40; disableUserInput false; make Action Menu (Press Space) work+connect with Hemp \epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp class smoke { condition = "!dyna_inVehicle && InSafeZone"; action = "if !('ItemKiloHemp' in magazines player) exitwith {['Get atleast one kilo of hemp to smoke...who needs less?',5] call Epoch_Message;};[] spawn{ player playMove 'amovpsitmstpsnonwnondnon_smoking';uisleep 2;call blaze_it;['Great stuff ...',5] call Epoch_Message;0.9 call epoch_setDrunk;player removeitem 'ItemKiloHemp';};"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa"; tooltip = "Smoke Weed"; }; I get this error: 12:53:26 Error in expression <_cur_mp.Altis\addons\blazeit.sqf" disabl#eUserInput true; closeDialog 0; hint > 12:53:26 Error position: <#eUserInput true; closeDialog 0; hint > 12:53:26 Error Missing ; 12:53:26 File mpmissions\__cur_mp.Altis\addons\blazeit.sqf, line 1 12:53:26 Error in expression <_cur_mp.Altis\addons\blazeit.sqf" disabl#eUserInput true; closeDialog 0; hint > 12:53:26 Error position: <#eUserInput true; closeDialog 0; hint > 12:53:26 Error Missing ; 12:53:26 File mpmissions\__cur_mp.Altis\addons\blazeit.sqf, line 1 Link to comment Share on other sites More sharing options...
Tarabas Posted May 25, 2018 Report Share Posted May 25, 2018 @SneerI can not reproduce and get no error in my rtp... did I see right you wrote: disabl#eUserInput true; ? than # is not needed here is a zip of a one which is not limited to the safezone and comes with a custom action-icon: https://www.file-upload.net/download-13148501/scriptBlaze.zip.html Link to comment Share on other sites More sharing options...
Sneer Posted May 29, 2018 Report Share Posted May 29, 2018 I'll try it out. Thanks Link to comment Share on other sites More sharing options...
Sneer Posted June 3, 2018 Report Share Posted June 3, 2018 Hey works great, my friends and I had a great time with this. Tarabas 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now