Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- File: fn_Robshops.sqf
- Author: MrKraken
- Description:
- Modified by: Pril
- */
- private ["_robber","_shop","_kassa","_ui","_pgText","_progress","_cP","_rip","_action"];
- _shop = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
- _robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param;
- _action = [_this,2] call BIS_fnc_param;
- _cops = (west countSide playableUnits);
- if(side _robber !=civilian) exitWith {hint "Oulah, j'ai vu qui vous etes ! Vous ne pouvez pas me braquer !";};
- if(_cops < 2) exitWith{[[_vault,-1],"disableSerialization;",false,false] spawn life_fnc_MP; hint "Il n'y a pas assez de Gendarmes!";};
- if(_robber distance _shop > 3) exitWith {hint "C'est n'est pas une caisse portable, restez a 3m !";};
- if (vehicle player !=_robber) exitWith {hint "On n'est pas au drive, descend de ton vehicule !";};
- if!(alive _robber) exitWith {};
- if (currentWeapon _robber isEqualTo "") exitWith {hint "Tu me fais pas peur, degage de la !";};
- _rip = true;
- _kassa = 5000 + round(random 75000);
- _shop removeAction _action;
- _chance = random(100); // Descendre cette valeur pour avoir moins de chance d'obtenir beaucoup d'argent.
- if(_chance >=20) then {
- [1,format["ALERTE BIPEUR : UN BRAQUAGE EST EN COURS DANS UN SFR !!!"]] remoteExec ["life_fnc_broadcast",west]
- };
- disableSerialization;
- 5 cutRsc ["life_progress", "PLAIN"];
- _ui = uiNamespace getVariable "life_progress";
- _progress = _ui displayCtrl 38201;
- _pgText = _ui displayCtrl 38202;
- _pgText ctrlSetText format["BRAQUAGE EN COURS RESTEZ A (3m) (1%1)...","%"];
- _progress progressSetPosition 0.01;
- _cP = 0.01;
- if(_rip) then
- {
- while{true} do
- {
- sleep 1.70;
- _cP = _cP + 0.01;
- _progress progressSetPosition _cP;
- _pgText ctrlSetText format ["BRAQUAGE EN COURS RESTEZ A (3m) (%1%2)...",round(_cP * 100), "%"];
- if (LIFE_SETTINGS(getNumber,"robberyMarkers") isEqualTo 1) then {
- _marker = createMarker ["Marker200", _shop];
- "Marker200" setMarkerColor "ColorRed";
- "Marker200" setMarkerText "/!\ATTENTION : BRAQUAGE EN COURS /!\";
- "Marker200" setMarkerType "mil_warning";
- };
- if(_cP >=2) exitWith {};
- if(_robber distance _shop > 3.5) exitWith{};
- if!(alive _robber) exitWith {};
- };
- if(_robber getVariable "restrained") exitWith {_rip = false; hint "Vous avez ete menotte !!";}; //Player got arrested, or restrained by another player!
- if(life_istazed) exitWith {_rip = false; hint "Vous avez ete neutraliser !!";}; //Player was tazed
- if!(alive _robber) exitWith {_rip = false;};
- if(_robber distance _shop > 3.5) exitWith {
- hint "Vous avez fait tombe la caisse en vous eloignant ! Barrez vous la Gendarmerie arrive !";
- deleteMarker "Marker200";
- 5 cutText ["","PLAIN"];
- [1,format["ALERTE : UN JARDILAND A SUBI UNE TENTATIVE DE BRAQUAGE !",_robber,name _robber, _shop]] remoteExec ["life_fnc_broadcast",west];
- [getPlayerUID _robber, _robber getVariable ["realname",name _robber], "211"] remoteExecCall ["life_fnc_wantedAdd", RSERV];
- };
- 5 cutText ["","PLAIN"];
- titleText[format["Vous avez reussi a prendre €%1 , la Gendarmerie arrive !",[_kassa] call life_fnc_numberText], "PLAIN"];
- life_cash = life_cash + _kassa;
- deleteMarker "Marker200";
- _rip = false;
- life_use_atm = false;
- playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", _robber];
- sleep 25;
- [1, format["ALERTE : UN JARDILAND VIEN D'ETRE BRAQUER POUR UNE VALEUR TOTAL DE €%1",[_kassa] call life_fnc_numberText]] remoteExec ["life_fnc_broadcast", civilian];
- sleep ((LIFE_SETTINGS(getNumber,"noatm_timer")) * 60);
- life_use_atm = true;
- if!(alive _robber) exitWith {};
- [getPlayerUID _robber, _robber getVariable ["realname",name _robber], "211"] remoteExecCall ["life_fnc_wantedAdd", RSERV];
- call SOCK_fnc_updatePartial;
- };
- sleep 1200; //20 Minutes
- _action = _shop addAction["Braquer le SFR",life_fnc_robShops,civilian];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement