SHOW:
|
|
- or go back to the newest paste.
1 | #include "..\..\script_macros.hpp" | |
2 | #include "..\..\script_macros.hpp" | |
3 | /* | |
4 | File: fn_ticketPay.sqf | |
5 | Author: Bryan "Tonic" Boardwine | |
6 | ||
7 | Description: | |
8 | Pays the ticket. | |
9 | */ | |
10 | if (isNil "life_ticket_val" || isNil "life_ticket_cop") exitWith {}; | |
11 | if (CASH < life_ticket_val) exitWith { | |
12 | if (BANK < life_ticket_val) exitWith { | |
13 | hint localize "STR_Cop_Ticket_NotEnough"; | |
14 | [1,"STR_Cop_Ticket_NotEnoughNOTF",true,[profileName]] remoteExecCall ["life_fnc_broadcast",life_ticket_cop]; | |
15 | closeDialog 0; | |
16 | }; | |
17 | ||
18 | hint format [localize "STR_Cop_Ticket_Paid",[life_ticket_val] call life_fnc_numberText]; | |
19 | BANK = BANK - life_ticket_val; | |
20 | [1] call SOCK_fnc_updatePartial; | |
21 | life_ticket_paid = true; | |
22 | ||
23 | [0,"STR_Cop_Ticket_PaidNOTF",true,[profileName,[life_ticket_val] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; | |
24 | [1,"STR_Cop_Ticket_PaidNOTF_2",true,[profileName]] remoteExecCall ["life_fnc_broadcast",life_ticket_cop]; | |
25 | [life_ticket_val,player,life_ticket_cop] remoteExecCall ["life_fnc_ticketPaid",life_ticket_cop]; | |
26 | ||
27 | if (life_HC_isActive) then { | |
28 | [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; | |
29 | } else { | |
30 | [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; | |
31 | }; | |
32 | closeDialog 0; | |
33 | }; | |
34 | ||
35 | CASH = CASH - life_ticket_val; | |
36 | [0] call SOCK_fnc_updatePartial; | |
37 | life_ticket_paid = true; | |
38 | ||
39 | if (life_HC_isActive) then { | |
40 | [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life]; | |
41 | } else { | |
42 | [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV]; | |
43 | }; | |
44 | ||
45 | [0,"STR_Cop_Ticket_PaidNOTF",true,[profileName,[life_ticket_val] call life_fnc_numberText]] remoteExecCall ["life_fnc_broadcast",west]; | |
46 | closeDialog 0; | |
47 | [1,"STR_Cop_Ticket_PaidNOTF_2",true,[profileName]] remoteExecCall ["life_fnc_broadcast",life_ticket_cop]; | |
48 | - | [life_ticket_val,player,life_ticket_cop] remoteExecCall ["life_fnc_ticketPaid",life_ticket_cop]; |
48 | + | |
49 | _value = life_ticket_val; | |
50 | maxence_compte_cop = maxence_compte_cop + _value; | |
51 | publicVariable "maxence_compte_cop"; | |
52 | [maxence_compte_gouv,maxence_compte_cop,maxence_compte_med,(name player),(name player),(["STR_COP_ACCOUNT","Max_Settings_Gouvernement","Gouvernement_Localization"] call theprogrammer_core_fnc_localize),_value,0] remoteExec ["max_gouvernement_fnc_updateAccounts",2]; |