-
Content Count
4230 -
Joined
-
Last visited
-
Medals
Single Status Update
See all updates by GEORGE FLOROS GR
-
Hello,
I need your help, if you have some time for me.
You make a rank script and i would like to add skills by rank. So when a player got a rank he had setUnitRecoilCoefficient and setCustomAimCoef decrease. I do something like this :
_player = ["GF_Rank_PRIVATE"];
{
if (true) then {player setCustomAimCoef 0.95 && player setUnitRecoilCoefficient 0.95};
['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;
uisleep 10;
['Votre recul d arme et votre visee ont ete ameliores de 5% .',0,0.6,2,1] spawn bis_fnc_dynamictext;
uisleep 10;
} forEach player;
_player = ["GF_Rank_CORPORAL"];
{
if (true) then {player setCustomAimCoef 0.90 && player setUnitRecoilCoefficient 0.90};
['Felicitations! Vous avez ete promu Caporal',0,0.6,2,1] spawn bis_fnc_dynamictext;
uisleep 10;
['Votre recul d arme et votre visee ont ete ameliores de 5% .',0,0.6,2,1] spawn bis_fnc_dynamictext;
uisleep 10;
} forEach player;It is working but never stop. I have the message, but the message for the next level too. Where am i wrong?
Can you help me please, as i am not a coder.
Regards,
Tiger.
- Show previous comments 3 more
-
Thanks very much.
If you have time can you explain how to do. I think file to modify is "GF_Ranks.sqf".
I worked on the code, and thinking you have already done the job in the line 180 to 186. it will be the way easier to modify and add extra code line, si i did it :
File : GF_Ranks.sqf
Line : 180 to 186.
In editor : No error, but no message too.
GF_Rank_Rating = {
_unit = _this select 0;
_rating = rating _unit;
_Rank = "";
switch true do {case(_Rating < GF_Rank_FUGITIVE) : {_Rank = "FUGITIVE";};
case((_Rating >= GF_Rank_PRIVATE) && (_Rating < GF_Rank_CORPORAL)) : {{{_Rank = "PRIVATE";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case((_Rating >= GF_Rank_CORPORAL) && (_Rating < GF_Rank_SERGEANT)) : {{{_Rank = "CORPORAL";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case((_Rating >= GF_Rank_SERGEANT) && (_Rating < GF_Rank_LIEUTENANT)) : {{{_Rank = "SERGEANT";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case((_Rating >= GF_Rank_LIEUTENANT) && (_Rating < GF_Rank_CAPTAIN)) : {{{_Rank = "LIEUTENANT";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case((_Rating >= GF_Rank_CAPTAIN) && (_Rating < GF_Rank_MAJOR)) : {{{_Rank = "CAPTAIN";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case((_Rating >= GF_Rank_MAJOR) && (_Rating < GF_Rank_COLONEL)) : {{{_Rank = "MAJOR";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
case(_Rating > GF_Rank_COLONEL) : {{{_Rank = "COLONEL";} : {_Rank setCustomAimCoef 0.95 && _Rank setUnitRecoilCoefficient 0.95} : {['Felicitations! Vous avez ete promu soldat de 1Classe!',0,0.6,2,1] spawn bis_fnc_dynamictext;}}};
};I juste need help. I am pretty sure, i mis somethink, can you have a look please?
- Show next comments 3 more