Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Player only
- BIS_fnc_numberDigits = compile preprocessFileLineNumbers "custom\numberDigits.sqf";
- BIS_fnc_numberText = compile preprocessFileLineNumbers "custom\numberText.sqf";
- // usage
- // _removed = [player, 5000] call SC_fnc_removeCoins;
- // if(_removed = true)then{ GREAT SUCCES }else{ IT FAILED, not enoguh money};
- SC_fnc_removeCoins=
- {
- private ["_player","_amount","_wealth","_newwealth", "_result"];
- _player = _this select 0;
- _amount = _this select 1;
- _result = false;
- _wealth = _player getVariable["headShots",0];
- if(_amount > 0)then{
- if (_wealth < _amount) then {
- _result = false;
- } else {
- _newwealth = _wealth - _amount;
- _player setVariable["headShots",_newwealth, true];
- _player setVariable ["moneychanged",1,true];
- _result = true;
- PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
- publicVariableServer "PVDZE_plr_Save";
- };
- }else{
- _result = true;
- };
- _result
- };
- // usage
- // _added = [player, 5000] call SC_fnc_addCoins;
- // if(_added = true)then{ GREAT SUCCES }else{ IT FAILED, Something went wrong};
- SC_fnc_addCoins =
- {
- private ["_player","_amount","_wealth","_newwealth", "_result"];
- _player = _this select 0;
- _amount = _this select 1;
- _result = false;
- _wealth = _player getVariable["headShots",0];
- _player setVariable["headShots",_wealth + _amount, true];
- PVDZE_plr_Save = [_player,(magazines _player),true,true] ;
- publicVariableServer "PVDZE_plr_Save";
- _player setVariable ["moneychanged",1,true];
- _newwealth = _player getVariable["headShots",0];
- if (_newwealth >= _wealth) then { _result = true; };
- _result
- };
- if (!isDedicated) then {
- .
- .
- .
- .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement