Kieran Hayns 1 Posted December 31, 2021 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
7erra 629 Posted January 2, 2022 maybe this function is used to handle money transfers.otherwise I would recommend looking around in the warlords functions Share this post Link to post Share on other sites
Kanas Kanas 2 Posted January 2, 2022 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
Kieran Hayns 1 Posted January 2, 2022 Fantastic Thanks Share this post Link to post Share on other sites
Kieran Hayns 1 Posted January 2, 2022 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
eddie247 10 Posted October 1, 2022 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
jakeplissken 81 Posted June 24, 2023 Set up a trigger like this. 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 { }; }]; 1 Share this post Link to post Share on other sites