As in the picture below do I add my code and code ? I just want the message that the money was stolen after the robbery
https://pasteboard.co/ItvydxW.jpg
Code
#include "..\..\script_macros.hpp"
/*
file: fn_robShops.sqf
Author: MrKraken
Description:
Executes the rob shob action!
*/
private["_shop","_robber","_action","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_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;
_rip = false;
if (side _robber != civilian) exitWith { hint "You can not rob this Gas Station" };
if (_robber distance _shop > 5) exitWith { hint "You need to be within 5m of the cashier to rob him!" };
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };
if !(alive _robber) exitWith {};
if (isNil {(group player) getVariable "gang_name"}) exitWith {hint localize "STR_ATM_NotInGang"};
if (currentWeapon _robber isEqualTo "") exitWith { hint "you do not threaten me! Get out of here you hobo!" };
if (_rip) exitWith { hint "Robbery already in progress" };
if (west countSide playableUnits < (LIFE_SETTINGS(getNumber,"minimum_cop"))) exitWith {
hint "There isnt enough Police to rob Gas Station!";
};
_rip = true;
_kassa = 380000 + round(random 100000);
_shop removeAction _action;
_shop switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(100);
if(_chance >= 10) then {
hint "ALARM";
[[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",west];
[[0,1,2],format["ALARM! - Gas Station: %1 is being robbed!",_shop]] remoteExecCall ["life_fnc_broadcast",civilian];
};
disableSerialization;
71 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Robbery in Progress, stay close (10m) (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.0001;
if(_rip) then {
while{true} do {
sleep 9*60;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Robbery in Progress, stay close (10m) (%1%2)...",round(_cP * 100),"%"];
_Pos = position player;
_marker = createMarker ["Marker200", _Pos];
"Marker200" setMarkerColor "ColorRed";
"Marker200" setMarkerText "!ATTENTION! robbery !ATTENTION!";
"Marker200" setMarkerType "mil_warning";
if(_cP >= 1) exitWith {};
if(_robber distance _shop > 10) exitWith {
deleteMarker "Marker200";
};
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _shop > 10) exitWith {
deleteMarker "Marker200";
_shop switchMove "";
hint "You need to stay within 10m to Rob registry!";
71 cutText ["","PLAIN"];
_rip = false;
};
71 cutText ["","PLAIN"];
titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200";
life_nakitATP = life_nakitATP + _kassa;
disableUserInput true;
sleep 5;
disableUserInput false;
_rip = false;
life_use_atm = false;
sleep (30 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[getPlayerUID _robber,name _robber,"459"] remoteExecCall ["life_fnc_wantedAdd",RSERV];
};
Alles anzeigen