caeden 11 Posted April 12, 2014 (edited) I am trying to add a parameter to my mission so I can choose whether or not to have fatigue on or off. So far it works when I test it from the editor, but it's not working on my dedicated server. Here's what it looks like: description.ext class PlayerFatigue //paramsArray[2] { title = "Player Fatigue"; values[] = {0,1}; texts[] = {"Fatigue Disabled","Fatigue Enabled"}; default = 0; file = "scripts\PlayerFatigue.sqf"; }; (For reference I have 2 other parameters before this one that work fine) PlayerFatigue.sqf if (isServer) then{ waitUntil {player == player}; if (!isNull player) then { if ((paramsArray select 2) == 0) then { player enableFatigue false; player addMPEventHandler ["MPRespawn",{player enableFatigue false;}]; hint "Fatigue Disabled"; Crossroads_HQ globalChat "Fatigue Disabled"; }; }; }; Can anyone tell me what I'm doing wrong, please!!! ---------- Post added at 00:43 ---------- Previous post was at 22:51 ---------- I've tried using this in the PlayerFatigue.sqf with no luck. waitUntil {player == player};if (!isNull player) then { if ((paramsArray select 2) == 0) then { {_x enableFatigue false;} forEach units group player; {_x addMPEventHandler ["MPRespawn", {_x enableFatigue false;}];} forEach units group player; hint "Fatigue Disabled"; Crossroads_HQ globalChat "Fatigue Disabled"; }; }; Edited April 14, 2014 by Caeden Share this post Link to post Share on other sites
caeden 11 Posted April 14, 2014 So I'm pretty sure I have fixed it. Description.ext class PlayerFatigue //paramsArray[2] { title = "Player Fatigue"; values[] = {0,1}; texts[] = {"Fatigue Disabled","Fatigue Enabled"}; default = 0; }; It's params 2 for me because I have 3 all together and this is the final one (They start at 0,1,2). Then create a initPlayerLocal.sqf that runs after the init.sqf (by default) and runs the scripts local to the player. initPlayerLocal.sqf ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////-------------------------------------------Parameter-Player-Fatigue-------------------------------------------------------- if ((paramsArray select 2) == 0) then { player enableFatigue false; player addEventhandler ["Respawn", {player enableFatigue false}]; hint "Fatigue Disabled"; Crossroads_HQ globalChat "Fatigue Disabled"; }; ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// I hope this helps others that are having the same issue with running something local to player. 1 Share this post Link to post Share on other sites
junglenz 10 Posted August 8, 2014 Great work, works well, disables the fatigue system (bloody annoying). 2 thumbs up. Share this post Link to post Share on other sites
sag-sag 10 Posted August 19, 2014 Thank you! Works perfectly! Share this post Link to post Share on other sites