Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "\life_server\script_macros.hpp"
- /*
- File: fn_gangCash.sqf
- Author: Fuel RebornRoleplay.com
- Description:
- checks the gang areas, then rewards the gang if they own them
- */
- /*
- #########################
- # north outpost #
- #########################
- */
- //gets the flag locations
- _area = [4877.5698,351.06879,21927.076] nearestObject "Flag_Red_F";
- //gets the gang names of the flag owners
- _owner = _area getVariable ["gangOwner",grpNull];
- //get the gang funds
- _gFund = _owner getVariable ["gang_bank",0];
- //set the new gang funds
- _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
- //push gang funds to DB
- [1,_owner] call TON_fnc_updateGang;
- /*
- #########################
- # south pen outpost #
- #########################
- */
- //gets the flag locations
- _area2 = [11197.487,186.38686,8717.8066] nearestObject "Flag_Red_F";
- //gets the gang names of the flag owners
- _owner = _area2 getVariable ["gangOwner",grpNull];
- //get the gang funds
- _gFund = _owner getVariable ["gang_bank",0];
- //set the new gang funds
- _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
- //push gang funds to DB
- [1,_owner] call TON_fnc_updateGang;
- /*
- #########################
- # east outpost #
- #########################
- */
- //gets the flag locations
- _area3 = [21492.381,15.649413,10828.369] nearestObject "Flag_Red_F";
- //gets the gang names of the flag owners
- _owner = _area3 getVariable ["gangOwner",grpNull];
- //get the gang funds
- _gFund = _owner getVariable ["gang_bank",0];
- //set the new gang funds
- _owner setVariable ["gang_bank",round(_gFund+((count playableUnits)*2000)),true];
- //push gang funds to DB
- [1,_owner] call TON_fnc_updateGang;
- //time between scripts
- Sleep 900;
- [] spawn TON_fnc_gangCash;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement