Jump to content
Sign in to follow this  

Recommended Posts

Hey everyone,

 

I have been looking around for an answer to my question!

 

I am wondering if you can put into say the init file of your mission that always it will give all players present like a huge rating increase, and then say repeat it over and over.

I want the players at all time to never ever switch to the sideEnemy or turn into renegades, no matter what happens. Any player who leave and enter.

 

 

 

cheers,

 

 

Share this post


Link to post
Share on other sites

You can set their rating on join to an absurdly high number:

//initPlayerLocal.sqf

params ["_player", "_didJIP"];

_player addRating 1000000;

or you can use an event handler:

//initPlayerLocal.sqf

params ["_player", "_didJIP"];

_player addEventHandler ["HandleRating", {
	params ["_unit", "_rating"];
    if (_rating <= 0) then {_unit addRating 2000};
}];

In the case of the former, you would have to destroy nearly 700 friendly riflemen or 150 friendly tanks to turn renegade. In the case of the latter, your rating will never drop below 0, or you can adjust the check value and addRating value to keep your players inside of a specific range if desired.

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
8 hours ago, Harzach said:

You can set their rating on join to an absurdly high number:


//initPlayerLocal.sqf

params ["_player", "_didJIP"];

_player addRating 1000000;

or you can use an event handler:


//initPlayerLocal.sqf

params ["_player", "_didJIP"];

_player addEventHandler ["HandleRating", {
	params ["_unit", "_rating"];
    if (_rating <= 0) then {_unit addRating 2000};
}];

In the case of the former, you would have to destroy nearly 700 friendly riflemen or 150 friendly tanks to turn renegade. In the case of the latter, your rating will never drop below 0, or you can adjust the check value and addRating value to keep your players inside of a specific range if desired.

 

Harzach thanks so much. I will give this a shot.

Share this post


Link to post
Share on other sites

If you don't care about the actual rating values and only want to block renegades you can simplify the EH in  @Harzach's 2nd example to:

 

_player addEventHandler ["HandleRating", {0}];

 

This will block all changes to the player's rating.

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×