It is meant to give players some respect and money for every 30mins of play. The server restarts at 6hrs.
Something seems a bit odd though as it sometimes resets peoples respect and money back to 400 if they relog or die. Am I missing something very simple here?
I'm really not sure about the if (ExileClientPlayerMoney > -1000) then {
I had no idea of how else to call it, sadly.
Any help is much appreciated
init.sqf
reward.sqf
Something seems a bit odd though as it sometimes resets peoples respect and money back to 400 if they relog or die. Am I missing something very simple here?
I'm really not sure about the if (ExileClientPlayerMoney > -1000) then {
I had no idea of how else to call it, sadly.
Any help is much appreciated
init.sqf
Code:
execVM "addons\reward\reward.sqf";
reward.sqf
Code:
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 400;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 400;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added (30 Mins)</t><br /><t color='#ffffff'> You received $400 + 400 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 400;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 400;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added (1 Hour)</t><br /><t color='#ffffff'> You received $400 + 400 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 450;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 450;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $450 + 450 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 450;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 450;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $450 + 450 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 500;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 500;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $500 + 500 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 500;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 500;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $500 + 500 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 550;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 550;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $550 + 550 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 550;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 550;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $550 + 550 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 18000;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 18000;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $18000 + 18000 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 18000;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 18000;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $18000 + 18000 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1800;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 650;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 650;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $650 + 650 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};
uiSleep 1500;
if (ExileClientPlayerMoney > -1000) then {
titleText ["", "PLAIN DOWN"];
_newPoptabs = ExileClientPlayerMoney + 650;
ENIGMA_UpdateStats = [player,_newPoptabs];
publicVariableServer "ENIGMA_UpdateStats";
_newScore = ExileClientPlayerScore + 650;
ENIGMA_UpdateStats = [player,0,_newScore];
publicVariableServer "ENIGMA_UpdateStats";
uiSleep 3;
["<br /><br /><br /><t color='#ffff00'>Loyalty Bonus Added:</t><br /><t color='#ffffff'> You received $650 + 650 Respect <img size='1.0' shadowColor='#000000' image='addons\statusbar\icons\exile.paa' color='%10'/></t>",0,0.9,10,2] spawn bis_fnc_dynamictext;
};