<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[TUTO] Braquage de Station service]]></title><description><![CDATA[<p dir="auto">Bonsoir à tous, comme je n'ai pas vu de tuto encore sur ca sur le forum, je me propose pour en faire un.</p>
<p dir="auto">Aller on commence. Je vous conseil de faire une sauvegarde avant de suivre ce tuto, on ne sait jamais, mieux vaut être prudent :</p>
<ul>
<li>Fichier qu'on va modifier : Mission.sqm, Functions.h</li>
<li>Fichier qu'on va créer : fn_robShops.sqf dans MISSION\core\actions</li>
</ul>
<p dir="auto">Tout d'abord allez dans la racine de votre mission <strong>MPMissions\racine</strong> ouvrez votre fichier <strong>Function.h</strong>, cherchez <strong>class Actions</strong> et rajoutez a la suite :</p>
<pre><code>class Actions
	{
		file = "core\actions";
		class buyLicense {};
		class healHospital {};
		class pushVehicle {};
		class repairTruck {};
		class serviceChopper {};

		...

		
		class sellLicense {};
		class robShops {}; //Rob Gas Station &amp; Shops Script
		class takeOrgans {};
</code></pre>
<pre><code>class robShops {}; //Voler station service
</code></pre>
<p dir="auto">Une fois cela modifié allez dans <strong>core\actions</strong> et créez un fichier <strong>fn_robShops.sqf</strong> et ajoutez ceci dedans :</p>
<pre><code>/*
file: fn_robShops.sqf
Author: MrKraken
Made from MrKrakens bare-bones shop robbing tutorial on www.altisliferpg.com forums
Description:
Executes the rob shob action!
Idea developed by PEpwnzya v1.0
*/
private["_robber","_shop","_kassa","_ui","_progress","_pgText","_cP","_rip","_pos"];
_shop = [_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 "Tu ne peux pas dérober cette station" };
if(_robber distance _shop &gt; 5) exitWith { hint "Tu dois etre a 5 mètres" };

if !(_kassa) then { _kassa = 1000; };
if (_rip) exitWith { hint "Avancement du braquage!" };
if (vehicle player != _robber) exitWith { hint "Sors de ton véhicule!" };

if !(alive _robber) exitWith {};
if (currentWeapon _robber == "") exitWith { hint "HaHa, ne me menace pas connard! Casses-toi !" };
if (_kassa == 0) exitWith { hint "La caisse est vide!" };// si il n'y a rien dans la caisse alors elle est vide (suite a un braquage)

_rip = true;
_kassa = 20000 + round(random 10000);//20000= le nombre minimal de la recette + suivant d'un "tirage au hasard"
_shop removeAction _action;
_shop switchMove "AmovPercMstpSsurWnonDnon";
_chance = random(100);
if(_chance &lt; 50) then { hint "Le caissier avait une alarme secrete, la police arrive!"; [[1,format["ALERTE la Station service: %1 est dérobé!", _shop]],"life_fnc_broadcast",west,false] spawn life_fnc_MP; }; //une chance sur 2 que la police sois contacter pendant le braquage

_cops = (west countSide playableUnits);
if(_cops &lt; 2) exitWith{[[_vault,-1],"disableSerialization;",false,false] spawn life_fnc_MP; hint "Il n'y a pas assez de policiers!";}; //2 est le nombre de policiers necessaire 
disableSerialization;
5 cutRsc ["life_progress","PLAIN"];
_ui = uiNameSpace getVariable "life_progress";
_progress = _ui displayCtrl 38201;
_pgText = _ui displayCtrl 38202;
_pgText ctrlSetText format["Progression du braquage (tu dois être à 10m) (1%1)...","%"];
_progress progressSetPosition 0.01;
_cP = 0.01;

if(_rip) then
{
while{true} do
{
sleep 0.8;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format["Progression du braquage (tu dois être à 10m) (%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 un braquage a lieu !";
				                "Marker200" setMarkerType "mil_warning";
if(_cP &gt;= 1) exitWith {};
if(_robber distance _shop &gt; 10.5) exitWith { };
if!(alive _robber) exitWith {};
};
if!(alive _robber) exitWith { _rip = false; };
if(_robber distance _shop &gt; 10.5) exitWith { deleteMarker "Marker200"; _shop switchMove ""; hint "Tu as besoin de resté à 10m pour que le braquage continue !"; 5 cutText ["","PLAIN"]; _rip = false; };
5 cutText ["","PLAIN"];

titleText[format["Vous avez volé $%1, maintenant partez, les flics arrivent !",[_kassa] call life_fnc_numberText],"PLAIN"];
deleteMarker "Marker200"; // by ehno delete maker
life_cash = life_cash + _kassa;

_rip = false;
life_use_atm = false;
sleep (60 + random(180));
life_use_atm = true;
if!(alive _robber) exitWith {};
[[getPlayerUID _robber,name _robber,"211"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
};
sleep 300;
_action = _shop addAction["Braquer la station service",life_fnc_robShops];
_shop switchMove "";
</code></pre>
<p dir="auto">Pour finir, allez sur votre editeur de map, <strong>rajoutez un PNJ civil non jouable</strong> et mettez ceci dans son initialisation</p>
<pre><code>this addAction["Rob Cash Register",life_fnc_robShops];
</code></pre>
<p dir="auto"><a href="/assets/uploads/ips/monthly_05_2015/post-225-0-86332400-1431000726.jpg"><img src="/assets/uploads/ips/monthly_05_2015/post-225-0-86332400-1431000726_thumb.jpg" alt="post-225-0-86332400-1431000726_thumb.jpg" class=" img-fluid img-markdown" /></a></p>
]]></description><link>http://new.melinyel.net/topic/1572/tuto-braquage-de-station-service</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 19:16:36 GMT</lastBuildDate><atom:link href="http://new.melinyel.net/topic/1572.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 May 2015 12:17:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [TUTO] Braquage de Station service on Fri, 08 May 2015 16:39:39 GMT]]></title><description><![CDATA[<p dir="auto">Merci A soulalex de l'avoir modifier car j'ai quelque petit soucis a utiliser</p>
]]></description><link>http://new.melinyel.net/post/16291</link><guid isPermaLink="true">http://new.melinyel.net/post/16291</guid><dc:creator><![CDATA[matthieu]]></dc:creator><pubDate>Fri, 08 May 2015 16:39:39 GMT</pubDate></item><item><title><![CDATA[Reply to [TUTO] Braquage de Station service on Fri, 08 May 2015 13:16:46 GMT]]></title><description><![CDATA[<p dir="auto">Merci pour le partage <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--wink" style="height:23px;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
]]></description><link>http://new.melinyel.net/post/16284</link><guid isPermaLink="true">http://new.melinyel.net/post/16284</guid><dc:creator><![CDATA[vfrz]]></dc:creator><pubDate>Fri, 08 May 2015 13:16:46 GMT</pubDate></item></channel></rss>