Jump to content

Recommended Posts

S

18 minutes ago, Halloweenpsycho said:

Step: 1

Skill required = Easy

Simply download the added .rar and the password = altislife then simply place the uzipped folder in your main altis directory. looks like (Main_direc)/core/functions/fn_robATM or if you preffer to copy paste thats fine as well. go to (main_direc)/core/functions then make a file named  fn_robATM  then copy and paste the script below. Save then go to step 2.

 

Oh please do not remove names from this script guys. thanks.

Big thanks to MrKraken

 

/*
file: fn_robATM.sqf
Author: MrKraken
Description:
Executes the rob atm action!
*/
private["_robber","_atm","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_atm = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
_robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
//_kassa = 1000; //The amount the shop has to rob, you could make this a parameter of the call (https://community.bistudio.com/wiki/addAction). Give it a try and post below ;)
_action = [_this,2] call BIS_fnc_param;//Action name

if(side _robber != civilian) exitWith { hint "You can not rob this ATM!" };
if(_robber distance _atm > 3) exitWith { hint "You need to be within 3m of the cashier to rob him!" };

if !(_kassa) then { _kassa = 1000; };
if (_rip) exitWith { hint "Robbery already in progress!" };
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

if (_kassa == 0) exitWith { hint "There is no cash in the ATM!" };

_rip = true;
_kassa = 120000 + round(random 60000);
_atm removeAction _action;
_atm switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(20);
if(_chance >= 50) then {[1,format["ALARM! - ATM: %1 is being robbed!", _atm]] remoteExec ["life_fnc_broadcast",west]; };

_cops = (west countSide playableUnits);
if(_cops < 0) exitWith{[_vault,-1] remoteExec ["disableSerialization;",2]; hint "There isnt enough Police to rob the Gas Station!";};
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Robbery in progress, stay within (3m) to complete (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.0001;

if(_rip) then
{
while{true} do
{
sleep 3;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Robbery in Progress, stay within(3m) to complete (%1%2)...",round(_cP * 100),"%"];
_Pos = position player; // by ehno: get player pos
                                _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map
                                "Marker200" setMarkerColor "ColorRed";
                                "Marker200" setMarkerText "!ATTENTION! ROBBERY IN PROGRESS !ATTENTION!";
                                "Marker200" setMarkerType "mil_warning";
if(_cP >= 1) exitWith {};
if(_robber distance _atm > 3) exitWith { };
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _atm > 3) exitWith { deleteMarker "Marker200"; _atm switchMove ""; hint "You need to stay within 3m to Rob register! - The ATM is now in tamper mode and has contacted the police!"; 5 cutText ["","PLAIN"]; _rip = false; };
5 cutText ["","PLAIN"];

titleText[format["You have stolen $%1, The cops are on there way!",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200"; // by ehno delete maker
life_cash = life_cash + _kassa;

_rip = false;
life_use_atm = false;
sleep (30 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
};
sleep 420;
_action = _atm this addAction["Rob the Gas Station",life_fnc_robstore];
_atm switchMove "";

Atm Robbery SQF.rar

2. Open your mission.sqm in the editor and go to a ATM and add then add the following to the init line of the NPC:

this addAction["Rob ATM",life_fnc_robATM];

 

step: 3

Go back to your root directory and open functions.hpp, once opened, find class Functions and at the end of the block add:

class robATM {};

4. ReCompile your mission and enjoy!

 

Edited by Halloweenpsycho
Directions

Share this post


Link to post
Share on other sites
8 minutes ago, Halloweenpsycho said:

Step: 1

Skill required = Easy

Simply download the added .rar and the password = altislife then simply place the uzipped folder in your main altis directory. looks like (Main_direc)/core/functions/fn_robATM or if you preffer to copy paste thats fine as well. go to (main_direc)/core/functions then make a file named  fn_robATM  then copy and paste the script below. Save then go to step 2.

 

Oh please do not remove names from this script guys. thanks.

Big thanks to MrKraken

 

/*
file: fn_robATM.sqf
Author: MrKraken
Description:
Executes the rob atm action!
*/
private["_robber","_atm","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_atm = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
_robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
//_kassa = 1000; //The amount the shop has to rob, you could make this a parameter of the call (https://community.bistudio.com/wiki/addAction). Give it a try and post below ;)
_action = [_this,2] call BIS_fnc_param;//Action name

if(side _robber != civilian) exitWith { hint "You can not rob this ATM!" };
if(_robber distance _atm > 3) exitWith { hint "You need to be within 3m of the cashier to rob him!" };

if !(_kassa) then { _kassa = 1000; };
if (_rip) exitWith { hint "Robbery already in progress!" };
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

if (_kassa == 0) exitWith { hint "There is no cash in the ATM!" };

_rip = true;
_kassa = 120000 + round(random 60000);
_atm removeAction _action;
_atm switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(20);
if(_chance >= 50) then {[1,format["ALARM! - ATM: %1 is being robbed!", _atm]] remoteExec ["life_fnc_broadcast",west]; };

_cops = (west countSide playableUnits);
if(_cops < 0) exitWith{[_vault,-1] remoteExec ["disableSerialization;",2]; hint "There isnt enough Police to rob the Gas Station!";};
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Robbery in progress, stay within (3m) to complete (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.0001;

if(_rip) then
{
while{true} do
{
sleep 3;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Robbery in Progress, stay within(3m) to complete (%1%2)...",round(_cP * 100),"%"];
_Pos = position player; // by ehno: get player pos
                                _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map
                                "Marker200" setMarkerColor "ColorRed";
                                "Marker200" setMarkerText "!ATTENTION! ROBBERY IN PROGRESS !ATTENTION!";
                                "Marker200" setMarkerType "mil_warning";
if(_cP >= 1) exitWith {};
if(_robber distance _atm > 3) exitWith { };
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _atm > 3) exitWith { deleteMarker "Marker200"; _atm switchMove ""; hint "You need to stay within 3m to Rob register! - The ATM is now in tamper mode and has contacted the police!"; 5 cutText ["","PLAIN"]; _rip = false; };
5 cutText ["","PLAIN"];

titleText[format["You have stolen $%1, The cops are on there way!",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200"; // by ehno delete maker
life_cash = life_cash + _kassa;

_rip = false;
life_use_atm = false;
sleep (30 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
};
sleep 420;
_action = _atm this addAction["Rob the Gas Station",life_fnc_robstore];
_atm switchMove "";

Atm Robbery SQF.rar

Step: 2

once you have complete above then go to

2. Open your mission.sqm in the editor and go to atm you and and add then following to the init line of the NPC:

this addAction["Rob ATM",life_fnc_robATM];

 

Share this post


Link to post
Share on other sites
11 minutes ago, Halloweenpsycho said:

Step: 1

Skill required = Easy

Simply download the added .rar and the password = altislife then simply place the uzipped folder in your main altis directory. looks like (Main_direc)/core/functions/fn_robATM or if you preffer to copy paste thats fine as well. go to (main_direc)/core/functions then make a file named  fn_robATM  then copy and paste the script below. Save then go to step 2.

 

Oh please do not remove names from this script guys. thanks.

Big thanks to MrKraken

 

/*
file: fn_robATM.sqf
Author: MrKraken
Description:
Executes the rob atm action!
*/
private["_robber","_atm","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_atm = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; //The object that has the action attached to it is _this. ,0, is the index of object, ObjNull is the default should there be nothing in the parameter or it's broken
_robber = [_this,1,ObjNull,[ObjNull]] call BIS_fnc_param; //Can you guess? Alright, it's the player, or the "caller". The object is 0, the person activating the object is 1
//_kassa = 1000; //The amount the shop has to rob, you could make this a parameter of the call (https://community.bistudio.com/wiki/addAction). Give it a try and post below ;)
_action = [_this,2] call BIS_fnc_param;//Action name

if(side _robber != civilian) exitWith { hint "You can not rob this ATM!" };
if(_robber distance _atm > 3) exitWith { hint "You need to be within 3m of the cashier to rob him!" };

if !(_kassa) then { _kassa = 1000; };
if (_rip) exitWith { hint "Robbery already in progress!" };
if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" };

if (_kassa == 0) exitWith { hint "There is no cash in the ATM!" };

_rip = true;
_kassa = 120000 + round(random 60000);
_atm removeAction _action;
_atm switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(20);
if(_chance >= 50) then {[1,format["ALARM! - ATM: %1 is being robbed!", _atm]] remoteExec ["life_fnc_broadcast",west]; };

_cops = (west countSide playableUnits);
if(_cops < 0) exitWith{[_vault,-1] remoteExec ["disableSerialization;",2]; hint "There isnt enough Police to rob the Gas Station!";};
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Robbery in progress, stay within (3m) to complete (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.0001;

if(_rip) then
{
while{true} do
{
sleep 3;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Robbery in Progress, stay within(3m) to complete (%1%2)...",round(_cP * 100),"%"];
_Pos = position player; // by ehno: get player pos
                                _marker = createMarker ["Marker200", _Pos]; //by ehno: Place a Maker on the map
                                "Marker200" setMarkerColor "ColorRed";
                                "Marker200" setMarkerText "!ATTENTION! ROBBERY IN PROGRESS !ATTENTION!";
                                "Marker200" setMarkerType "mil_warning";
if(_cP >= 1) exitWith {};
if(_robber distance _atm > 3) exitWith { };
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _atm > 3) exitWith { deleteMarker "Marker200"; _atm switchMove ""; hint "You need to stay within 3m to Rob register! - The ATM is now in tamper mode and has contacted the police!"; 5 cutText ["","PLAIN"]; _rip = false; };
5 cutText ["","PLAIN"];

titleText[format["You have stolen $%1, The cops are on there way!",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200"; // by ehno delete maker
life_cash = life_cash + _kassa;

_rip = false;
life_use_atm = false;
sleep (30 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2];
};
sleep 420;
_action = _atm this addAction["Rob the Gas Station",life_fnc_robstore];
_atm switchMove "";

Atm Robbery SQF.rar

step: 3

Go back to your root directory and open functions.hpp, once opened, find class Functions and at the end of the block add:

class robATM {};

4. ReCompile your mission and enjoy!

Share this post


Link to post
Share on other sites
15 hours ago, Captcha said:

my guy any way to change the robbing time

Just like any other progress bar, make the sleep shorter or increase the increment on _cP:

sleep 3;
_cP = _cP + 0.01;

 

Share this post


Link to post
Share on other sites
On 7/27/2019 at 4:11 PM, mxchaz741 said:

How would i make so the police get alerted ?

RemoteExec life_fnc_broadcast with a message with west as the target. Look at other robberies in the framework for examples.

Share this post


Link to post
Share on other sites
On 8/8/2019 at 7:49 PM, Keegan said:

The script works with the "Global ATM" on the map?
(Marked and Unmarked)

It'll work with whatever you put it in the init of, nothing more:

 XRmKQ37.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...