mistaparadox 10 Posted September 13, 2014 Hey guys, I recently tried to add my own addAction menu linking to my own custom script I made. In my init.sqf I placed this: player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; It works for the first player who joins the server, but any others after him do not have the option in the action menu to choose the script. Any ideas? Share this post Link to post Share on other sites
iceman77 18 Posted September 13, 2014 (edited) waitUntil {!isNull player && {time > 1}};//JIP player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; Edited September 13, 2014 by Iceman77 Share this post Link to post Share on other sites
mistaparadox 10 Posted September 14, 2014 waitUntil {!isNull player && {time > 1}};//JIP player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; That worked fine, but when people die, they don't have the option to remove fatigue anymore. Do I need some sort of MP Respawning event or what? Share this post Link to post Share on other sites
iceman77 18 Posted September 14, 2014 (edited) You can re-add the addAction with a respawn EH. waitUntil {!isNull player && {time > 1}};//JIP player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; player addEventHandler ["respawn",{ _this addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; }]; Edited September 14, 2014 by Iceman77 Share this post Link to post Share on other sites
Heeeere's johnny! 51 Posted September 14, 2014 (edited) You need to addAction whenever a player spawns, because on death they lose all actions added in their "previous life". So yeah, create an eventHandler like this: player addEventHandler ["Respawn", {_this addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"];} ]; Nevermind, ninja'd. Edited October 11, 2014 by waltenberg Share this post Link to post Share on other sites
mistaparadox 10 Posted September 15, 2014 You need to addAction whenever a player spawns, because on death they lose all actions added in their "previous life". So yeah, create an eventHandler like this: player addEventHandler ["Respawn", {_this addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"];} ]; Nevermind, Iceman was quicker. You can re-add the addAction with a respawn EH. waitUntil {!isNull player && {time > 1}};//JIP player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; player addEventHandler ["respawn",{ _this addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; }]; Hmm... I tried this along with using "addMPEventHandler" and "MPRespawn" but still it didn't work. When they die, they don't have the Remove Fatigue in the action menu, and I'm quite confused. I've literally copied the code exactly and put it in my init.sqf and still nothing. Share this post Link to post Share on other sites
iceman77 18 Posted September 15, 2014 Sorry, use this instead waitUntil {!isNull player && {time > 1}};//JIP player addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; player addEventHandler ["respawn",{ (_this select 0) addAction ['<t color="#41A317">' + "Remove Fatigue" + '</t>', "scripts\Loadout\Fatigue.sqf"]; }]; ---------- Post added at 22:18 ---------- Previous post was at 22:10 ---------- Btw, use -showScriptErrors startup parameter if you're not already. Share this post Link to post Share on other sites