<?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[Ajouter la bourse !]]></title><description><![CDATA[<p dir="auto">Bonjour à tous, aujourd'hui je vais traduire un tutoriel pour ajouter la bourse, source : <a href="http://altisliferpg.com" rel="nofollow ugc">altisliferpg.com</a></p>
<p dir="auto">1 - Allez dans votre functions.h et ajouter ceci à la fin :</p>
<pre><code>class Market{	file = "core\market";	class openMarketView;	class refreshMarketView;	class marketShortView;	class marketBuy;	class marketSell;	class marketGetBuyPrice;	class marketGetSellPrice;	class marketconfiguration;	class marketReset;	class marketChange;	class marketGetRow;	class marketGetPriceRow;	class marketSetPriceRow;};
</code></pre>
<p dir="auto">Dans le fichier functions.h à nouveau, ajouter ceci en dessous de la class functions :</p>
<pre><code>class Functions{	file = "core\functions";				class randomRound {}; // &lt;--------- add this};
</code></pre>
<p dir="auto">2 - Allez dans le dossier Dialog et copier les 2 fichiers disponibles dans le .zip et ouvrer votre MasterHandler.h et ajouter ceci :</p>
<pre><code>#include "common_EditorWrapper.hpp"#include "market.hpp"
</code></pre>
<p dir="auto">3 - Ouvrez votre fn_virt_sell.sqf dans core/shops</p>
<p dir="auto">Ajoutez à private ceci ["_marketprice"];<br />
Comme ceci :</p>
<pre><code>private["_type","_index","_price","_var","_amount","_name","_marketprice"];
</code></pre>
<p dir="auto">Maintenant trouver cette ligne :</p>
<pre><code>_price = (__GETC__(sell_array) select _index) select 1;_var = [_type,0] call life_fnc_varHandle;
</code></pre>
<p dir="auto">Ajoutez ceci en dessous :</p>
<pre><code>_marketprice = [_type] call life_fnc_marketGetSellPrice;if(_marketprice != -1) then{	_price = _marketprice;};
</code></pre>
<p dir="auto">Trouvez cette ligne :</p>
<pre><code>life_cash = life_cash + _price;
</code></pre>
<p dir="auto">Ajoutez ceci en dessous :</p>
<pre><code>if(_marketprice != -1) then { 	[_type, _amount] spawn	{		sleep 120;		[_this select 0,_this select 1] call life_fnc_marketSell;	};};
</code></pre>
<p dir="auto">4- Fermer le fichier et ouvrer le fichier fn_virt_update.sqf dans le même dossier</p>
<p dir="auto">Ajoutez à private ceci ["_marketprice"];<br />
Comme ceci :</p>
<pre><code>private["_type","_index","_price","_var","_amount","_name","_marketprice"];
</code></pre>
<p dir="auto">Maintenant trouvez cette ligne :</p>
<pre><code>_price = (__GETC__(buy_array) select _index) select 1;
</code></pre>
<p dir="auto">Ajoutez ceci en dessous:</p>
<pre><code>marketprice = [_x] call life_fnc_marketGetBuyPrice;if(_marketprice != -1) then{	_price = _marketprice;};
</code></pre>
<p dir="auto">A la fin du fichier ajoutez ceci :</p>
<pre><code>//Call short view here[_shop_data select 1] spawn life_fnc_marketShortView;
</code></pre>
<p dir="auto">Comme ceci :</p>
<pre><code>if(_val &gt; 0) then	{		_gear_list lbAdd format["%1x %2",_val,_name];		_gear_list lbSetData [(lbSize _gear_list)-1,_x];	};} foreach (_shop_data select 1); //Call short view here // this its the new line to add[_shop_data select 1] spawn life_fnc_marketShortView; // this its the new line to add
</code></pre>
<p dir="auto">5 - Fermer le fichier et ouvrez fn_virt_buy.sqf aussi dans le même dossier</p>
<p dir="auto">Ajoutez à private ceci :</p>
<pre><code>"_marketprice"
</code></pre>
<p dir="auto">Comme ceci :</p>
<pre><code>private["_type","_price","_amount","_diff","_name","_hideout","_marketprice"];
</code></pre>
<p dir="auto">Trouvez cette ligne :</p>
<pre><code>_amount = ctrlText 2404;
</code></pre>
<p dir="auto">Ajoutez ceci en dessous:</p>
<pre><code>_marketprice = [_type] call life_fnc_marketGetBuyPrice;if(_marketprice != -1) then{	_price = _marketprice;};
</code></pre>
<p dir="auto">Trouvez cette ligne :</p>
<pre><code>__SUB__(life_cash,(_price * _amount));
</code></pre>
<p dir="auto">Ajoutez ceci en dessous:</p>
<pre><code>if(_marketprice != -1) then { 	//##94	[_type, _amount] spawn	{		sleep 120;		[_this select 0,_this select 1] call life_fnc_marketBuy;	};			};
</code></pre>
<p dir="auto">6 - Ouvrer le fichier dialog\player_inv.hpp</p>
<p dir="auto">En dessous de ceci :</p>
<pre><code>class ButtonSyncData : life_RscButtonMenu {	idc = -1;	//shortcuts[] = {0x00050000 + 2};	text = "$STR_PM_SyncData";	onButtonClick = "[] call SOCK_fnc_syncData;";	x = 0.1;	y = 0.805;	w = (6.25 / 40);	h = (1 / 25);};
</code></pre>
<p dir="auto">Ajoutez ceci :</p>
<pre><code>class ButtonMarket : Life_RscButtonMenu {	idc = -1;	text = "Bourse";	onButtonClick = "[] spawn life_fnc_openMarketView;";	//x = 0.26 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));	x = 0.26 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH));	y = 0.805;	w = (6.25 / 40);	h = (1 / 25);};
</code></pre>
<p dir="auto">Ouvrez le fichier init.sqf dans VOTRENOMDEMISSION\init.sqf et en dessous de :</p>
<pre><code>[] execVM "briefing.sqf"; //Load Briefing[] execVM "KRON_Strings.sqf";
</code></pre>
<p dir="auto">Ajoutez ça :</p>
<pre><code>if(isDedicated &amp;&amp; isNil("life_market_prices")) then{[] call life_fnc_marketconfiguration;diag_log "Market prices generated!"; "life_market_prices" addPublicVariableEventHandler{diag_log format["Market prices updated! %1", _this select 1];}; //Start server fsm[] execFSM "core\fsm\server.fsm";diag_log "Server FSM executed";};
</code></pre>
<p dir="auto">Et pour la dernière étape allez dans core\fsm and déplacer le fichier server.fsm dispo dans le .zip</p>
<p dir="auto">Désormais vous avez votre système de bourse, enjoy <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
<p dir="auto">Pour le kick par BattlEye, il suffit d'ajouter ces lignes dans Battleye\publicvariable.txt :</p>
<pre><code>1 "" !="life_HC_isActive" !="HC_UID"7 "" !="life_market_shortnames" !="life_fnc_MP_packet" !="BIS_fnc_MP_packet" !="JipTimeNow" !="life_HC_isActive" !="HC_UID" !="life_gang_list" !="bank_addfunds" !="life_market_prices" !="IL_SetMass" !="IL_SetScore" !="IL_SetDir" !="life_market_resources" !="bis_fnc_execvm" !="Life_fnc_execvm"
</code></pre>
<p dir="auto">Maintenant pour la version 3.1.4.6+ changez le fichier fn_virt_sell.sqf danscore/shops remplacez le par ceci :</p>
<pre><code>#include &lt;macro.h&gt;/*    File: fn_virt_sell.sqf    Author: Bryan "Tonic" Boardwine        Description:    Sell a virtual item to the store / shop*/ private["_type","_index","_price","_var","_amount","_name","_marketprice"];if((lbCurSel 2402) == -1) exitWith {};_type = lbData[2402,(lbCurSel 2402)];_index = [_type,__GETC__(sell_array)] call fnc_index;if(_index == -1) exitWith {};_price = (__GETC__(sell_array) select _index) select 1;_var = [_type,0] call life_fnc_varHandle;_marketprice = [_type] call life_fnc_marketGetSellPrice;if(_marketprice != -1) then{    _price = _marketprice;}; _amount = ctrlText 2405;if(!([_amount] call fnc_isnumber)) exitWith {hint localize "STR_Shop_Virt_NoNum";};_amount = parseNumber (_amount);if(_amount &gt; (missionNameSpace getVariable _var)) exitWith {hint localize "STR_Shop_Virt_NotEnough"}; _price = (_price * _amount);_name = [_var] call life_fnc_vartostr;if(([false,_type,_amount] call life_fnc_handleInv)) then{    hint format[localize "STR_Shop_Virt_SellItem",_amount,_name,[_price] call life_fnc_numberText];    life_cash = life_cash + _price;    if(_marketprice != -1) then        {            [_type, _amount] spawn            {                sleep 120;                [_this select 0,_this select 1] call life_fnc_marketSell;            };    };    [] call life_fnc_virt_update;	}; if(life_shop_type == "heroin") then{    private["_array","_ind","_val"];    _array = life_shop_npc getVariable["sellers",[]];    _ind = [getPlayerUID player,_array] call fnc_index;    if(_ind != -1) then    {        _val = (_array select _ind) select 2;        _val = _val + _price;        _array set[_ind,[getPlayerUID player,profileName,_val]];        life_shop_npc setVariable["sellers",_array,true];    }        else    {        _array set[count _array,[getPlayerUID player,profileName,_price]];        life_shop_npc setVariable["sellers",_array,true];    };};
</code></pre>
<p dir="auto">Merci à : Linxy pour son aide</p>
<p dir="auto">Touts les fichiers nécessaire (.zip) : <a href="https://mega.co.nz/#!fZFQjJbB!OGIlZTYFW-ZT-czIiOE8k6GPBFa056TcJTR8u9T6jS8" rel="nofollow ugc">https://mega.co.nz/#!fZFQjJbB!OGIlZTYFW-ZT-czIiOE8k6GPBFa056TcJTR8u9T6jS8</a></p>
<p dir="auto">Patch 3.1.4.8: Copiez les fichiers suivant spécifiques :</p>
<p dir="auto">fn.Virt_sell.sqf</p>
<pre><code>#include &lt;macro.h&gt;/*	File: fn_virt_sell.sqf	Author: Bryan "Tonic" Boardwine		Description:	Sell a virtual item to the store / shop*/private["_type","_index","_price","_var","_amount","_name","_marketprice"];if((lbCurSel 2402) == -1) exitWith {};_type = lbData[2402,(lbCurSel 2402)];_index = [_type,__GETC__(sell_array)] call TON_fnc_index;if(_index == -1) exitWith {};_price = (__GETC__(sell_array) select _index) select 1;_var = [_type,0] call life_fnc_varHandle;////Marktsystem Anfang////_marketprice = [_type] call life_fnc_marketGetSellPrice;if(_marketprice != -1) then{	_price = _marketprice;};////Marktsystem Ende//// _amount = ctrlText 2405;if(!([_amount] call fnc_isnumber)) exitWith {hint "You didn't enter an actual number";};_amount = parseNumber (_amount);if(_amount &gt; (missionNameSpace getVariable _var)) exitWith {hint "You don't have that many items to sell!"}; _price = (_price * _amount);_name = [_var] call life_fnc_vartostr;if(([false,_type,_amount] call life_fnc_handleInv)) then{	hint format["You sold %1 %2 for $%3",_amount,_name,[_price] call life_fnc_numberText];	life_cash = life_cash + _price;	////Marktsystem Anfang////	if(_marketprice != -1) then 	{ 		[_type, _amount] spawn		{			sleep 120;			[_this select 0,_this select 1] call life_fnc_marketSell;		};	////Marktsystem Ende////	};	[] call life_fnc_virt_update;	}; if(life_shop_type == "heroin") then{	private["_array","_ind","_val"];	_array = life_shop_npc getVariable["sellers",[]];	_ind = [getPlayerUID player,_array] call TON_fnc_index;	if(_ind != -1) then	{		_val = (_array select _ind) select 2;		_val = _val + _price;		_array set[_ind,[getPlayerUID player,profileName,_val]];		life_shop_npc setVariable["sellers",_array,true];	}		else	{		_array pushBack _array,[getPlayerUID player,profileName,_price]];		life_shop_npc setVariable["sellers",_array,true];	};};
</code></pre>
<p dir="auto">fn.virt_update.sqf</p>
<pre><code>#include &lt;macro.h&gt;/*	File: fn_virt_update.sqf	Author: Bryan "Tonic" Boardwine		Description:	Update and fill the virtual shop menu.*/private["_display","_item_list","_gear_list","_shop_data","_name","_price","_marketprice"];disableSerialization; //Setup control vars._display = findDisplay 2400;_item_list = _display displayCtrl 2401;_gear_list = _display displayCtrl 2402; //Purge listlbClear _item_list;lbClear _gear_list; _shop_data = [life_shop_type] call life_fnc_virt_shops;ctrlSetText[2403,format["%1", _shop_data select 0]]; {	_name = [([_x,0] call life_fnc_varHandle)] call life_fnc_vartostr;	_index = [_x,__GETC__(buy_array)] call TON_fnc_index;	if(_index != -1) then	{		_price = (__GETC__(buy_array) select _index) select 1;		////Marktsystem Anfang////		_marketprice = [_x] call life_fnc_marketGetBuyPrice;		if(_marketprice != -1) then		{			_price = _marketprice;		};		////Marktsystem Ende////		_item_list lbAdd format["%1  ($%2)",_name,[_price] call life_fnc_numberText];		_item_list lbSetData [(lbSize _item_list)-1,_x];		_item_list lbSetValue [(lbSize _item_list)-1,_price];	};} foreach (_shop_data select 1); {	_var = [_x,0] call life_fnc_varHandle;	_val = missionNameSpace getVariable _var;	_name = [_var] call life_fnc_vartostr;		if(_val &gt; 0) then	{		_gear_list lbAdd format["%1x %2",_val,_name];		_gear_list lbSetData [(lbSize _gear_list)-1,_x];	};} foreach (_shop_data select 1); //Call short view here[_shop_data select 1] spawn life_fnc_marketShortView;
</code></pre>
<p dir="auto">And a little exemple for fix the xxxxxx in the market:</p>
<pre><code>["apple", 100, 50, 150, 4, 2,		[			["peach",1] &lt;------- no coma 		]	],  and for long line["cement", 2250, 250, 4250, 4, 2,		[ 			["diamondc",1], &lt;------- coma			["oilp",1],  &lt;------- coma			["iron_r",1],  &lt;------- coma			["copper_r",1],  &lt;------- coma			["salt_r",1],  &lt;------- coma			["glass",1] &lt;------- no coma		] 	],  Last items in your configurationmarket ["heroinp", 7000, 3000, 10000, 4, 4,   		[ 			["marijuana",1],   &lt;------- coma			["turtle",1],  &lt;------- coma			["cocainep",1] &lt;------- no coma		] 	]  &lt;------- no coma
</code></pre>
<p dir="auto">Crédit : _Fuzz pour le tutoriel sur <a href="http://altisliferpg.com" rel="nofollow ugc">altisliferpg.com</a> et EdgeKiller pour la traduction !</p>
]]></description><link>http://new.melinyel.net/topic/1319/ajouter-la-bourse</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 18:35:40 GMT</lastBuildDate><atom:link href="http://new.melinyel.net/topic/1319.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Nov 2014 21:50:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ajouter la bourse ! on Thu, 18 Feb 2016 16:13:12 GMT]]></title><description><![CDATA[<p dir="auto">j'ai suivit votre tuto la bourse marche presque car quand je clic sur bourse il n'y a pas de ressource sa me met xxxxxxx$ quelqu'un peut m'aider s'il vous plaît ?</p>
<p dir="auto">et j'ai plus rien sur le marché help pls</p>
]]></description><link>http://new.melinyel.net/post/17637</link><guid isPermaLink="true">http://new.melinyel.net/post/17637</guid><dc:creator><![CDATA[mrsfalko]]></dc:creator><pubDate>Thu, 18 Feb 2016 16:13:12 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Fri, 22 Jan 2016 20:53:53 GMT]]></title><description><![CDATA[<p dir="auto">Je ne sais pas, mais regarde plutôt par ici : <a href="http://www.altisliferpg.com/topic/4528-howtotutorial-market-system-economy-system/" rel="nofollow ugc">http://www.altisliferpg.com/topic/4528-howtotutorial-market-system-economy-system/</a></p>
]]></description><link>http://new.melinyel.net/post/17617</link><guid isPermaLink="true">http://new.melinyel.net/post/17617</guid><dc:creator><![CDATA[vfrz]]></dc:creator><pubDate>Fri, 22 Jan 2016 20:53:53 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Wed, 20 Jan 2016 19:51:58 GMT]]></title><description><![CDATA[<p dir="auto">sa marche tous jours ?</p>
]]></description><link>http://new.melinyel.net/post/17616</link><guid isPermaLink="true">http://new.melinyel.net/post/17616</guid><dc:creator><![CDATA[MrXow]]></dc:creator><pubDate>Wed, 20 Jan 2016 19:51:58 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Sat, 03 Oct 2015 20:14:06 GMT]]></title><description><![CDATA[<p dir="auto">lien zip mort</p>
]]></description><link>http://new.melinyel.net/post/17455</link><guid isPermaLink="true">http://new.melinyel.net/post/17455</guid><dc:creator><![CDATA[Killian]]></dc:creator><pubDate>Sat, 03 Oct 2015 20:14:06 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Thu, 20 Nov 2014 15:50:19 GMT]]></title><description><![CDATA[<p dir="auto"><strong>Message automatique</strong></p>
<p dir="auto">Le sujet a été déplacé de « [Émulation](&lt;<em><strong>base_url</strong></em>&gt;/forum/59-%C3%A9mulation/) → [Arma III](&lt;<em><strong>base_url</strong></em>&gt;/forum/120-arma-iii/) » à « [Émulation](&lt;<em><strong>base_url</strong></em>&gt;/forum/59-%C3%A9mulation/) → [Arma III](&lt;<em><strong>base_url</strong></em>&gt;/forum/120-arma-iii/) → [Tutoriels](&lt;<em><strong>base_url</strong></em>&gt;/forum/207-tutoriels/) ».</p>
]]></description><link>http://new.melinyel.net/post/14028</link><guid isPermaLink="true">http://new.melinyel.net/post/14028</guid><dc:creator><![CDATA[vfrz]]></dc:creator><pubDate>Thu, 20 Nov 2014 15:50:19 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Thu, 20 Nov 2014 13:15:40 GMT]]></title><description><![CDATA[<p dir="auto">XD , nan mais quand y'a 10 lignes comme ça ok ca passe</p>
<p dir="auto">;mais heuresement que ta pas fait ça avec genre stringable.xml xD</p>
]]></description><link>http://new.melinyel.net/post/13999</link><guid isPermaLink="true">http://new.melinyel.net/post/13999</guid><dc:creator><![CDATA[ArrowDark]]></dc:creator><pubDate>Thu, 20 Nov 2014 13:15:40 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Wed, 19 Nov 2014 19:58:47 GMT]]></title><description><![CDATA[<p dir="auto">Wath the fuck ? x) c'est quoi ce bug de merde ? Je le ferais plus tard, trop la flemme la  <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
]]></description><link>http://new.melinyel.net/post/13992</link><guid isPermaLink="true">http://new.melinyel.net/post/13992</guid><dc:creator><![CDATA[vfrz]]></dc:creator><pubDate>Wed, 19 Nov 2014 19:58:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Wed, 19 Nov 2014 18:16:55 GMT]]></title><description><![CDATA[<p dir="auto">Petit blem , tes codes sont tout en ligne , et par exemple pour les derniers truc il faut tout remettre le fichier corréctement --' xD</p>
]]></description><link>http://new.melinyel.net/post/13979</link><guid isPermaLink="true">http://new.melinyel.net/post/13979</guid><dc:creator><![CDATA[ArrowDark]]></dc:creator><pubDate>Wed, 19 Nov 2014 18:16:55 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Tue, 18 Nov 2014 12:29:31 GMT]]></title><description><![CDATA[<p dir="auto">merci du tuto que j'attendais depuis très longtemps <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61b.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--stuck_out_tongue" style="height:23px;width:auto;vertical-align:middle" title=":P" alt="😛" /></p>
]]></description><link>http://new.melinyel.net/post/13950</link><guid isPermaLink="true">http://new.melinyel.net/post/13950</guid><dc:creator><![CDATA[subherox]]></dc:creator><pubDate>Tue, 18 Nov 2014 12:29:31 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Mon, 17 Nov 2014 18:43:47 GMT]]></title><description><![CDATA[<p dir="auto">Ben ouais, j'ai pas trouver de tutoriel en francais, donc je l'ai traduit moi même <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61b.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--stuck_out_tongue" style="height:23px;width:auto;vertical-align:middle" title=":P" alt="😛" /></p>
]]></description><link>http://new.melinyel.net/post/13915</link><guid isPermaLink="true">http://new.melinyel.net/post/13915</guid><dc:creator><![CDATA[vfrz]]></dc:creator><pubDate>Mon, 17 Nov 2014 18:43:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ajouter la bourse ! on Mon, 17 Nov 2014 14:48:44 GMT]]></title><description><![CDATA[<p dir="auto">Merci pour ce tutoriel <img src="http://new.melinyel.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=aa95655114f" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:23px;width:auto;vertical-align:middle" title=":)" alt="🙂" /> , en plus Fuzz il est parle Français et c'est toi qui fait sa traduction x)</p>
]]></description><link>http://new.melinyel.net/post/13900</link><guid isPermaLink="true">http://new.melinyel.net/post/13900</guid><dc:creator><![CDATA[ArrowDark]]></dc:creator><pubDate>Mon, 17 Nov 2014 14:48:44 GMT</pubDate></item></channel></rss>