Jump to content
Kieran Hayns

WARLORDS CP deduction/addition

Recommended Posts

does anyone no if there is a way to Add or subtract CP from a player during a warlords game using script.

 

I want to make a few additions to the game including penalties and possibly random CP loot.

 

for Example if i were to write a script that would detect if you team kill someone i could deduct a certain amount of CP

 

or if they open a certain crate they gain some.

Share this post


Link to post
Share on other sites

Adds 100 points to the player.

player setVariable ["BIS_WL_funds", (player getVariable "BIS_WL_funds") + 100, TRUE];

Share this post


Link to post
Share on other sites
10 hours ago, Kanas Kanas said:

Adds 100 points to the player.

player setVariable ["BIS_WL_funds", (player getVariable "BIS_WL_funds") + 100, TRUE];

This dosent seem to do anything.

Share this post


Link to post
Share on other sites

Bit of a necro but did you get anywhere with this? 

It's possible that the code you have is only working in the initialisation of the mission. I'd like to see how this should work tho for eu11 server...

Share this post


Link to post
Share on other sites

Set up a trigger like this.

20230624145055-1.jpg

 

Place this code as the condition:
 

{_x isEqualTo player} count thisList > 0;

Then, this is the On Activation code:
 

if(playerSide != opfor) then {cutText ["You are camping, stop it.","PLAIN DOWN"]; player setDamage 0.99; player setVariable ["BIS_WL_funds", 0, TRUE]; removeAllItemsWithMagazines player; player removeWeapon primaryWeapon player};

This will punish a BLUFOR player for trespassing near an OPFOR base.

 

Use this code to take all CP from the player.

 

player setVariable ["BIS_WL_funds", 0, TRUE];

Or this to deal with teamkilling.

addMissionEventHandler ["EntityKilled", {
	params ["_unit","_killer"];
	if (side _unit == side _killer and _killer == player) then {
		player setVariable ["BIS_WL_funds", 10, TRUE];
	} else {

	};
}];

 

  • 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

×