Joe98 92 Posted December 6, 2015 I like the number 28. What does the number 1 mean in the command? . Share this post Link to post Share on other sites
spidypiet 17 Posted December 6, 2015 setCustomAimCoef is used to reduce weapon sway 1= full sway 0= no sway my personal setting is 0.5 along with player setUnitRecoilCoefficient 0.6 Share this post Link to post Share on other sites
Jnr4817 215 Posted January 8, 2017 How do you set this up in the game for multiplayer? Share this post Link to post Share on other sites
davidoss 552 Posted January 8, 2017 i do this like this init.sqf fnc_setPgunHandle = { params ["_player"]; private _pstamina = paramsArray select 0; private _pwrecoil = (paramsArray select 1)/100; private _pwsway = (paramsArray select 2)/100; if (_pstamina == 0) then { _player enableStamina false; }; _player setUnitRecoilCoefficient _pwrecoil; _player setCustomAimCoef _pwsway; }; description.ext class Params { class PStamina { //0 title = "Enable/Disable Player's Stamina"; values[] = {0,1}; texts[] = {"Disable","Enable"}; default = 0; }; class PRecoil { //1 title = "Player's Weapon Recoil"; values[] = {10,40,70,100}; texts[] = {"No recoil","Poor recoil","Standart recoil","Intensive recoil"}; default = 70; }; class PAimCoef { //2 title = "Player's Weapon Sway"; values[] = {10,40,70,100}; texts[] = {"No sway","Poor sway","Standart sway","Intensive sway"}; default = 70; }; }; initPlayerLocal.sqf [player] call fnc_setPgunHandle; player addEventHandler ["Respawn",{ null = [_this select 0, _this select 1] spawn { params ["_player", "_body"]; [_body] joinSilent grpNull; hideBody _body; waitUntil {sleep 0.5; alive _player}; [_player] call fnc_setPgunHandle; }; }]; Share this post Link to post Share on other sites
Jnr4817 215 Posted January 8, 2017 instead of just adding to init, how could I add to my scripts folder and then call from the init? Share this post Link to post Share on other sites
davidoss 552 Posted January 8, 2017 put params ["_player"]; private _pstamina = paramsArray select 0; private _pwrecoil = (paramsArray select 1)/100; private _pwsway = (paramsArray select 2)/100; if (_pstamina == 0) then { _player enableStamina false; }; _player setUnitRecoilCoefficient _pwrecoil; _player setCustomAimCoef _pwsway; in somescriptfile.sqf and in initPlayerLocal.sqf: fnc_setPgunHandle = call compileFinal preprocessFileLineNumbers "somescriptfile.sqf"; [player] call fnc_setPgunHandle; player addEventHandler ["Respawn",{ null = [_this select 0, _this select 1] spawn { params ["_player", "_body"]; [_body] joinSilent grpNull; hideBody _body; waitUntil {sleep 0.5; alive _player}; [_player] call fnc_setPgunHandle; }; }]; Share this post Link to post Share on other sites