I currently have this:
//initPlayerLocal.sqf
private ["_sg_kills", "_sg_deaths", "_player"];
_player = _this select 2;
if (isNil {profileNamespace getVariable "sg_kills"}) then {
profileNamespace setVariable ["sg_kills", 0];
};
_lkills = (profileNamespace getVariable "sg_kills");
_player setVariable ["sg_kills", _lkills];
player addMPEventHandler ["MPKilled", {null = execVM "scripts\sg_stats.sqf";}];
So I have created the variable sg_kills and it is set to 0 for newcomers and if you have already played it finds what it is.
I can only imagine that this works (please tell if I have gotten something wrong above too).
I am having trouble finding out what I would do in my sg_stats.sqf. I have my variable sg_kills and I have tried adding onto it, but it always ends in errors and it not doing what I wanted it to.
I tried:
//sg_scripts.sqf
player addMPEventHandler ["MPKilled" {sg_kills + 1}];
hint format [sg_kills];
Any help with what I should add into the sg_stats.sqf would be very much so appreciated! I am just trying to make it add a kill onto the sg_kills variable and then display a hint after every kill you get. I am using profileNamespace because I want these statistics to save even after the mission ends ( It's a DM game mode ).