I want to add a script to my server that will set some variables, based on the number of Zombie Kills the player has. I'm using the line of code from my custom debug monitor to retrieve the number of zombies killed.
Here's what I've been trying ...
-----------------------------------------------------------------
_kills = player getVariable["zombieKills",0];
if (_kills < 10) then {
_var1 = 0;
_var2 = 0;
};
if (_kills > 10) then {
_var1 = 1;
_var2 = 5;
};
if (_kills > 20) then {
_var1 = 2;
_var2 = 10;
};
------------------------------------------------------------------
The trouble I have with this code is that my if statement checks on the variable _kills, never read as true, so _var1 and _var2 are never set.
Is there something I'm missing here?
Thanks for any suggestions.
Here's what I've been trying ...
-----------------------------------------------------------------
_kills = player getVariable["zombieKills",0];
if (_kills < 10) then {
_var1 = 0;
_var2 = 0;
};
if (_kills > 10) then {
_var1 = 1;
_var2 = 5;
};
if (_kills > 20) then {
_var1 = 2;
_var2 = 10;
};
------------------------------------------------------------------
The trouble I have with this code is that my if statement checks on the variable _kills, never read as true, so _var1 and _var2 are never set.
Is there something I'm missing here?
Thanks for any suggestions.