Jump to content
Animatek

How can I lock player into a faction between server restarts?

Recommended Posts

Hi, again:

In my A3Wasteland server, the users belong to a fixed faction (Blufor or Opfor, except for Indies); everyone knows to each other and that create competition. That’s OK for us.

But, some time users exploit the fact server can’t lock into a faction between server restart, they play in the enemy faction, localize bases, and destroy vehicles for revenge o simple indiscipline. Then they bail out and wait until next restart. To persuade I restart once a day, every 24h, that’s not enough and s**ks por server performance.

That makes me crazy, because a have to check it every day databases, and ban users. That’s not OK.
I notice database saves the last faction we play, so how can I use that info to lock players? Please, help.

Share this post


Link to post
Share on other sites

 

//client

[] spawn {

waitUntil {sleep 1; getClientStateNumber > 9};

0 = [profileName,player] remoteExecCall ["checkside",2];


};


//server

checkside = {

	params [["_profilename","",[""]],["_player",objNull,[objNull]]];

	private _curentSide = missionNamespace getVariable [_profilename,nil];
	if (isNil "_curentSide") exitWith {missionNamespace setVariable [_profilename, str (side _player)]};

	private _clientId = owner _player;
	
	if !(_curentSide isEqualTo (str (side _player))) then {
	
	   0 = ["End1"] remoteExec ["endMission", _clientId];
	   
	};
};

Not tested written right  out of the head..

Share this post


Link to post
Share on other sites

store each players side in the servers uiNamespace as its persistent between missions

  • Like 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

×