-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Rework the gang bank system to ensure requests are routed via the server.
- Loading branch information
Showing
12 changed files
with
136 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "..\..\script_macros.hpp" | ||
/* | ||
File: fn_gankBankResponse.sqf | ||
Author: DomT602 | ||
Description: | ||
Receives response from the server. | ||
*/ | ||
params [ | ||
["_value",-1,[0]] | ||
]; | ||
if (remoteExecutedOwner != ([2,HC_Life] select life_HC_isActive)) exitWith {}; | ||
if (_value isEqualTo -1) exitWith {}; | ||
|
||
hint format [localize "STR_ATM_WithdrawSuccessG",[_value] call life_fnc_numberText]; | ||
CASH = CASH + _value; | ||
[] call life_fnc_atmMenu; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "..\..\script_macros.hpp" | ||
/* | ||
File: fn_gangWithdraw.sqf | ||
Author: Bryan "Tonic" Boardwine | ||
Description: | ||
Withdraws money from the gang bank. | ||
*/ | ||
params [ | ||
["_deposit",false,[false]] | ||
]; | ||
|
||
private _value = parseNumber(ctrlText 2702); | ||
private _gFund = GANG_FUNDS; | ||
if ((time - life_action_delay) < 0.5) exitWith {hint localize "STR_NOTF_ActionDelay"}; | ||
|
||
//Series of stupid checks | ||
if (isNil {(group player) getVariable "gang_name"}) exitWith {hint localize "STR_ATM_NotInGang"}; // Checks if player isn't in a gang | ||
if (_value > 999999) exitWith {hint localize "STR_ATM_WithdrawMax";}; | ||
if (_value < 1) exitWith {}; | ||
if (!([str(_value)] call TON_fnc_isnumber)) exitWith {hint localize "STR_ATM_notnumeric"}; | ||
if (_deposit && _value > CASH) exitWith {hint localize "STR_ATM_NotEnoughCash"}; | ||
if (!_deposit && _value > _gFund) exitWith {hint localize "STR_ATM_NotEnoughFundsG"}; | ||
|
||
if (_deposit) then { | ||
CASH = CASH - _value; | ||
[] call life_fnc_atmMenu; | ||
}; | ||
|
||
if (life_HC_isActive) then { | ||
[1,group player,_deposit,_value,player,CASH] remoteExecCall ["HC_fnc_updateGang",HC_Life]; //Update the database. | ||
} else { | ||
[1,group player,_deposit,_value,player,CASH] remoteExecCall ["TON_fnc_updateGang",RSERV]; //Update the database. | ||
}; | ||
|
||
life_action_delay = time; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
//regex | ||
1 "" !="_this call fn_whoDoneIt" | ||
5 "" !BIS_fnc_(effectKilled(AirDestruction|Secondaries)|execVM) !DB_fnc_(insertRequest|queryRequest|updatePartial|updateRequest) !HC_fnc_(addContainer|addHouse|chopShopSell|deleteDBContainer|getVehicles|insertGang|insertRequest|jailSys|queryRequest|receivekeyofServer) !HC_fnc_(removeGang|sellHouse(Container)?|spawnVehicle|spikeStrip) !HC_fnc_update(Gang|HouseContainers|HouseTrunk|Partial|Request) !HC_fnc_vehicle(Create|Delete|Store|Update) !HC_fnc_wanted(Add|Bounty|Crimes|Fetch|ProfUpdate|Remove) !life_fnc_(AAN|addVehicle2Chain|adminid|admininfo|animSync|bountyReceive|broadcast|colorVehicle|copLights) !life_fnc_(copSearch|CopSiren|corpse|demoChargeTimer|flashbang|freezePlayer|gangCreated|gangDisbanded|gangInvite) !life_fnc_(garageRefund|giveDiff|hideObj|impoundMenu|jail(Me|Sys)?) !life_fnc_(jumpFnc|knockedOut|licenseCheck|licensesRead|lightHouse|lockVehicle|medic(Lights|Request|Siren)) !life_fnc_(moveIn|pickupItem|pickupMoney|pulloutVeh|receiveItem|receiveMoney|removeLicenses|restrain|revived) !life_fnc_(robPerson|robReceive|say3D|searchClient|seizeClient|setFuel|simDisable|soundDevice|spikeStripEffect) !life_fnc_(tazeSound|ticketPaid|ticketPrompt|vehicleAnimate) !life_fnc_wanted(Add|Bounty|Crimes|Fetch|Info|List|ProfUpdate|Remove) !life_fnc_wireTransfer !SOCK_fnc_(dataQuery|insertPlayerInfo|updateRequest) !SPY_fnc_(cookieJar|notifyAdmins|observe) !TON_fnc_(addContainer|addHouse|chopShopSell|cleanupRequest|handleBlastingCharge) !TON_fnc_clientGang(Kick|Leader|Left) !TON_fnc_(clientGetKey|clientMessage) !TON_fnc_(deleteDBContainer|getID|getVehicles|insertGang|keyManagement|managesc|pickupAction|player_query|recupkeyforHC) !TON_fnc_(removeGang|sellHouse(Container)?|spawnVehicle|spikeStrip) !TON_fnc_update(Gang|HouseContainers|HouseTrunk) !TON_fnc_vehicle(Create|Delete|Store|Update) !="_this call fn_whoDoneIt" | ||
5 "" !BIS_fnc_(effectKilled(AirDestruction|Secondaries)|execVM) !DB_fnc_(insertRequest|queryRequest|updatePartial|updateRequest) !HC_fnc_(addContainer|addHouse|chopShopSell|deleteDBContainer|getVehicles|insertGang|insertRequest|jailSys|queryRequest|receivekeyofServer) !HC_fnc_(removeGang|sellHouse(Container)?|spawnVehicle|spikeStrip) !HC_fnc_update(Gang|HouseContainers|HouseTrunk|Partial|Request) !HC_fnc_vehicle(Create|Delete|Store|Update) !HC_fnc_wanted(Add|Bounty|Crimes|Fetch|ProfUpdate|Remove) !life_fnc_(AAN|addVehicle2Chain|adminid|admininfo|animSync|bountyReceive|broadcast|colorVehicle|copLights) !life_fnc_(copSearch|CopSiren|corpse|demoChargeTimer|flashbang|freezePlayer|gangCreated|gangDisbanded|gangInvite) !life_fnc_(garageRefund|giveDiff|hideObj|impoundMenu|jail(Me|Sys)?) !life_fnc_(jumpFnc|knockedOut|licenseCheck|licensesRead|lightHouse|lockVehicle|medic(Lights|Request|Siren)) !life_fnc_(moveIn|pickupItem|pickupMoney|pulloutVeh|receiveItem|receiveMoney|removeLicenses|restrain|revived) !life_fnc_(robPerson|robReceive|say3D|searchClient|seizeClient|setFuel|simDisable|soundDevice|spikeStripEffect) !life_fnc_(tazeSound|ticketPaid|ticketPrompt|vehicleAnimate|gangBankResponse) !life_fnc_wanted(Add|Bounty|Crimes|Fetch|Info|List|ProfUpdate|Remove) !life_fnc_wireTransfer !SOCK_fnc_(dataQuery|insertPlayerInfo|updateRequest) !SPY_fnc_(cookieJar|notifyAdmins|observe) !TON_fnc_(addContainer|addHouse|chopShopSell|cleanupRequest|handleBlastingCharge) !TON_fnc_clientGang(Kick|Leader|Left) !TON_fnc_(clientGetKey|clientMessage) !TON_fnc_(deleteDBContainer|getID|getVehicles|insertGang|keyManagement|managesc|pickupAction|player_query|recupkeyforHC) !TON_fnc_(removeGang|sellHouse(Container)?|spawnVehicle|spikeStrip) !TON_fnc_update(Gang|HouseContainers|HouseTrunk) !TON_fnc_vehicle(Create|Delete|Store|Update) !="_this call fn_whoDoneIt" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.