Skip to content

Tutoriels

30 Topics 243 Posts

This category can be followed from the open social web via the handle [email protected]

  • Admin Menu 3.1.4.8

    16
    0 Votes
    16 Posts
    9k Views
    ArrowDarkA
    <p>Bonjour , je tien a précisé que ce tuto ne viens pas de moi mais de Forum Bulldog : <span style="font-size:14px;"><a href="http://www.altisliferpg.com/topic/4375-modifyextended-admin-menu/" rel="external nofollow">http://www.altisliferpg.com/topic/4375-modifyextended-admin-menu/</a></span><br/>  <br/> Commençons tout de suite : <br/>  <br/>  <br/> 1 . Commencer par aller dans votre base de donnée dans players puis structure puis cherché adminlevel , et rajouté 2 grade admin cela devrait ressemblé à ça :</p> <pre class="ipsCode prettyprint"> '0','1','2','3','4','5' </pre> <p>2 . Aller dans Function.h (qui se trouve a la racine de votre mission) et modifié la Class Admin</p> <pre class="ipsCode prettyprint"> class Civilian { file = "core\civilian"; class freezePlayer {}; }; class Admin { file = "core\admin"; class admininfo {}; class adminid {}; class admingetID {}; class adminMenu {}; class adminQuery {}; class adminSpectate {}; class adminTeleport {}; class adminTpHere {}; class adminDebugCon {}; class adminCompensate {}; class adminGodMode {}; class adminFreeze {}; class adminMarkers {}; }; </pre> <p>3 . Aller dans stringtable.xml (Qui se trouve à la racine de votre mission)  et modifié Admin Menu</p> <pre class="ipsCode prettyprint"> <Key ID="STR_Admin_Spectate"> <Original>Spectate</Original> <English>Spectate</English> <German>Zuschauen</German> <French>Regardez</French> </Key> <Key ID="STR_Admin_Teleport"> <Original>Teleport</Original> <English>Teleport</English> <German>Teleport</German> <French>Teleport</French> </Key> <Key ID="STR_Admin_TpHere"> <Original>TP Here</Original> <English>TP Here</English> <German>TP Hier</German> <French>TP Ici</French> </Key> <Key ID="STR_Admin_Debug"> <Original>Debug</Original> <English>Debug</English> <German>Debug</German> <French>Debug</French> </Key> <Key ID="STR_Admin_Compensate"> <Original>Comp</Original> <English>Comp</English> <German>Comp</German> <French>Comp</French> </Key> <Key ID="STR_Admin_God"> <Original>GodMode</Original> <English>GodMode</English> <German>Gott</German> <French>Dieu</French> </Key> <Key ID="STR_Admin_Freeze"> <Original>Freeze</Original> <English>Freeze</English> <German>Freeze</German> <French>Geler</French> </Key> <Key ID="STR_Admin_Markers"> <Original>Markers</Original> <English>Markers</English> <German>Markers</German> <French>Markers</French> </Key> <Key ID="STR_ANOTF_CompWarn"> <Original>You are about to give yourself $%1 to compensate to another player &lt;br/&gt;&lt;br/&gt;You must give this cash to the person you are compensating manually.</Original> <English>You are about to give yourself $%1 to compensate to another player &lt;br/&gt;&lt;br/&gt;You must give this cash to the person you are compensating manually.</English> <German>To Be Changed</German> <French>Vous êtes sur le point de vous donner $%1 pour compenser à un autre joueur &lt;br/&gt;&lt;br/&gt; S'il vous plaît donner à cette à la personne vous compensez manuellement</French> </Key> <Key ID="STR_ANOTF_Success"> <Original>You have added $%1 to your account.</Original> <English>You have added $%1 to your account.</English> <German>To Be Changed</German> <French>Vous avez ajouté $%1 à votre compte</French> </Key> <Key ID="STR_ANOTF_Fail"> <Original>You can not go above 999999.</Original> <English>You can not go above 999999.</English> <German>To Be Changed</German> <French>Vous ne pouvez pas aller au-dessus $999999</French> </Key> <Key ID="STR_ANOTF_Amount"> <Original>Please type in the amount to compensate.</Original> <English>Please type in the amount to compensate.</English> <German>To Be Changed</German> <French>S'il vous plaît entrer la quantité pour compenser</French> </Key> <Key ID="STR_ANOTF_Frozen"> <Original>You have disabled %1's input.</Original> <English>You have disabled %1's input.</English> <German>To Be Changed</German> <French>Vous avez désactivé %1's contrôles</French> </Key> <Key ID="STR_ANOTF_Unfrozen"> <Original>You have enabled %1's input.</Original> <English>You have enabled %1's input.</English> <German>To Be Changed</German> <French>Vous avez permis %1's contrôles</French> </Key> <Key ID="STR_ANOTF_Error"> <Original>You can't do that dumbass.</Original> <English>You can't do that dumbass.</English> <German>To Be Changed</German> <French>Vous ne pouvez pas le faire sur vous-même</French> </Key> <Key ID="STR_ANOTF_ErrorLevel"> <Original>Your Admin Level is not high enough.</Original> <English>Your Admin Level is not high enough.</English> <German>To Be Changed</German> <French>Votre Niveau admin n'est pas suffisamment élevée</French> </Key> <Key ID="STR_ANOTF_MDisabled"> <Original>Player Markers Disabled.</Original> <English>Player Markers Disabled.</English> <German>To Be Changed</German> <French>Needs Translation</French> </Key> <Key ID="STR_ANOTF_MEnabled"> <Original>Player Markers Enabled.</Original> <English>Player Markers Enabled.</English> <German>To Be Changed</German> <French>Needs Translation</French> </Key> <Key ID="STR_NOTF_ActionCancel"> <Original>Action Cancelled</Original> <English>Action Cancelled</English> <German>Aktion abgebrochen</German> <French>Action Annulée</French> </Key> <Key ID="STR_Global_Yes"> <Original>Yes</Original> <English>Yes</English> <German>Ja</German> <French>Oui</French> </Key> <Key ID="STR_Global_No"> <Original>No</Original> <English>No</English> <German>Nein</German> <French>Aucun</French> </Key> </pre> <p>4 . Toujours dans le même fichier juste en dessous Modifié Notification admin </p> <pre class="ipsCode prettyprint"> <Key ID="STR_NOTF_Frozen"> <Original>You have been frozen by an administrator</Original> <English>You have been frozen by an administrator</English> <German>To Be Changed</German> </Key> <Key ID="STR_NOTF_Unfrozen"> <Original>You have been unfrozen by an administrator</Original> <English>You have been unfrozen by an administrator</English> <German>To Be Changed</German> </Key> </pre> <p>5 . <strong>dialog\admin_menu.hpp</strong></p> <pre class="ipsCode prettyprint"> class life_admin_menu { idd = 2900; name= "life_admin_menu"; movingEnable = false; enableSimulation = true; onLoad = "[] spawn life_fnc_adminMenu;"; class controlsBackground { class Life_RscTitleBackground:Life_RscText { colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; idc = -1; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class MainBackground:Life_RscText { colorBackground[] = {0, 0, 0, 0.7}; idc = -1; x = 0.1; y = 0.2 + (11 / 250); w = 0.8; h = 0.6 - (2 / 250); }; }; class controls { class Title : Life_RscTitle { colorBackground[] = {0, 0, 0, 0}; idc = 2901; text = "$STR_Admin_Title"; x = 0.1; y = 0.2; w = 0.6; h = (1 / 25); }; class PlayerList_Admin : Life_RscListBox { idc = 2902; text = ""; sizeEx = 0.035; //colorBackground[] = {0,0,0,0}; onLBSelChanged = "[_this] spawn life_fnc_adminQuery"; x = 0.12; y = 0.26; w = 0.30; h = 0.4; }; class PlayerBInfo : Life_RscStructuredText { idc = 2903; text = ""; x = 0.42; y = 0.25; w = 0.35; h = 0.6; }; class CloseButtonKey : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.88 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class AdminID : Life_RscButtonMenu { idc = -1; text = "$STR_Admin_GetID"; onButtonClick = "[] call life_fnc_admingetID;"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.88 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class Compensate : Life_RscButtonMenu { idc = 2904; text = "$STR_Admin_Compensate"; onButtonClick = "createDialog ""Life_Admin_Compensate"";"; x = 0.26 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.88 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class Spectate : Life_RscButtonMenu { idc = 2905; text = "$STR_Admin_Spectate"; onButtonClick = "[] call life_fnc_adminSpectate;"; x = 0.42 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.88 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class Teleport : Life_RscButtonMenu { idc = 2906; text = "$STR_Admin_Teleport"; onButtonClick = "[] call life_fnc_adminTeleport; hint 'Select where you would like to teleport';"; x = 0.58 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.88 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class TeleportHere : Life_RscButtonMenu { idc = 2907; text = "$STR_Admin_TpHere"; onButtonClick = "[] call life_fnc_adminTpHere;"; x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.885; w = (6.25 / 40); h = (1 / 25); }; class God : Life_RscButtonMenu { idc = 2908; text = "$STR_Admin_God"; onButtonClick = "[] call life_fnc_adminGodMode;"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.885; w = (6.25 / 40); h = (1 / 25); }; class Freeze : Life_RscButtonMenu { idc = 2909; text = "$STR_Admin_Freeze"; onButtonClick = "[] call life_fnc_adminFreeze;"; x = 0.26 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.885; w = (6.25 / 40); h = (1 / 25); }; class Markers : Life_RscButtonMenu { idc = 2910; text = "$STR_Admin_Markers"; onButtonClick = "[] spawn life_fnc_adminMarkers;"; x = 0.42 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.885; w = (6.25 / 40); h = (1 / 25); }; class Debug : Life_RscButtonMenu { idc = 2911; text = "$STR_Admin_Debug"; onButtonClick = "hint 'Disabled';"; x = 0.58 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.885; w = (6.25 / 40); h = (1 / 25); }; }; }; </pre> <p>6 . <strong>dialog\compensate.hpp</strong></p> <pre class="ipsCode prettyprint"> class Life_Admin_Compensate { idd = 9920; name= "life_admin_compensate_give"; movingEnable = false; enableSimulation = true; onLoad = "[] spawn {waitUntil {!isNull (findDisplay 9920)}; ((findDisplay 9920) displayCtrl 9921) ctrlSetText localize ""STR_Admin_Amount""};"; class controlsBackground { class Life_RscTitleBackground:Life_RscText { colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; idc = -1; x = 0.1; y = 0.2; w = 0.5; h = (1 / 25); }; class MainBackground:Life_RscText { colorBackground[] = {0, 0, 0, 0.7}; idc = -1; x = 0.1; y = 0.2 + (11 / 250); w = 0.5; h = 0.3 - (22 / 250); }; }; class controls { class InfoMsg : Life_RscStructuredText { idc = 9921; sizeEx = 0.020; text = ""; x = 0.1; y = 0.25; w = 0.5; h = 0.11; }; class Title : Life_RscTitle { colorBackground[] = {0, 0, 0, 0}; idc = -1; text = "$STR_Admin_Compensate"; x = 0.1; y = 0.2; w = 0.5; h = (1 / 25); }; class AdminCloseComp : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.5 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class AdminCompensVer : Life_RscButtonMenu { idc = -1; text = "$STR_Admin_Compensate"; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; onButtonClick = "[] spawn life_fnc_adminCompensate;"; x = 0.27; y = 0.40; w = (6.25 / 40); h = (1 / 25); }; class AdminCompensTex : Life_RscEdit { idc = 9922; text = ""; x = 0.04 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.35; w = (13 / 40); h = (1 / 25); }; }; }; </pre> <p>7.  <strong>dialog\MasterHandler.h</strong></p> <pre class="ipsCode prettyprint"> #include "compensate.hpp" </pre> <p>8 . <strong>core\admin\fn_adminMenu.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminMenu.sqf Author: Bryan "Tonic" Boardwine Description: Opens the admin menu, sorry nothing special in here. Take a look for yourself. */ if(GETC(life_adminlevel) < 1) exitWith {closeDialog 0;}; private["_display","_list","_side"]; disableSerialization; waitUntil {!isNull (findDisplay 2900)}; _display = findDisplay 2900; _list = _display displayCtrl 2902; if(GETC(life_adminlevel) < 1) exitWith {closeDialog 0;}; switch(GETC(life_adminlevel)) do { case 1: {ctrlShow [2904,false];ctrlShow [2905,false];ctrlShow [2906,false];ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];}; case 2: {ctrlShow [2905,false];ctrlShow [2906,false];ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];}; case 3: {ctrlShow [2907,false];ctrlShow [2908,false];ctrlShow [2909,false];ctrlShow [2910,false];ctrlShow [2911,false];}; case 4: {[2911,false];}; }; //Purge List lbClear _list; { _side = switch(side _x) do {case west: {"Cop"}; case civilian : {"Civ"}; case independent : {"Med"}; default {"Unknown"};}; _list lbAdd format["%1 - %2", _x getVariable["realname",name _x],_side]; _list lbSetdata [(lbSize _list)-1,str(_x)]; } foreach playableUnits; if(GETC(life_adminlevel) < 1) exitWith {closeDialog 0;}; </pre> <p>9 . <strong>core\admin\fn_adminSpectate.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminSpectate.sqf Author: ColinM9991 Description: Spectate the chosen player. */ if(GETC(life_adminlevel) == 0) exitWith {closeDialog 0;}; private["_unit"]; _unit = lbData[2902,lbCurSel (2902)]; _unit = call compile format["%1", _unit]; if(isNil "_unit") exitwith {}; if(isNull _unit) exitWith {}; if(_unit == player) exitWith {hint localize "STR_ANOTF_Error";}; [] spawn { while {dialog} do { closeDialog 0; sleep 0.01; }; }; _unit switchCamera "INTERNAL"; hint format["You are now spectating %1 \n\n Press F10 to stop Spectating.",_unit getVariable["realname",name _unit]]; AM_Exit = (findDisplay 46) displayAddEventHandler ["KeyDown","if((_this select 1) == 68) then {(findDisplay 46) displayRemoveEventHandler ['KeyDown',AM_Exit];player switchCamera 'INTERNAL';hint 'You have stopped spectating';};false"]; </pre> <p>10 . <strong>core\admin\fn_adminTeleport.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminTeleport.sqf Author: ColinM9991 Credits: To original script author(s) Description: Teleport to chosen position. */ if(GETC(life_adminlevel) == 0) exitWith {closeDialog 0;}; [] spawn { while {dialog} do { closeDialog 0; sleep 0.01; }; }; tele={ _pos = [_this select 0, _this select 1, _this select 2]; (vehicle player) setpos [_pos select 0, _pos select 1, 0]; onMapSingleClick ""; openMap [false, false]; hint "You have teleported to your selected position"; }; openMap [true, false]; onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call tele"; </pre> <p>11. <strong>core\admin\fn_adminTpHere.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminTpHere.sqf Author: ColinM9991 Description: Teleport selected player to you. */ if(GETC(life_adminlevel) == 0) exitWith {closeDialog 0;}; private["_target"]; _target = lbData[2902,lbCurSel (2902)]; _target = call compile format["%1", _target]; if(isNil "_target") exitwith {}; if(isNull _target) exitWith {}; if(_unit == player) exitWith {hint localize "STR_ANOTF_Error";}; _target setPos (getPos player); hint format["You have teleported %1 to your location",_target getVariable["realname",name _target]]; </pre> <p>12. <strong>core\admin\fn_adminCompensate.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminCompensate.sqf Author: ColinM9991 Description: Figure it out. */ private["_value","_action"]; if(GETC(life_adminlevel) < 2) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";}; _value = parseNumber(ctrlText 9922); if(_value < 0) exitWith {}; if(_value > 999999) exitWith {hint localize "STR_ANOTF_Fail"}; //if(!([str(_value)] call life_fnc_isnumeric)) exitWith {hint localize "STR_AIM_notnumeric"}; _action = [ format [localize "STR_ANOTF_CompWarn",[_value] call life_fnc_numberText], localize "STR_Admin_Compensate", localize "STR_Global_Yes", localize "STR_Global_No" ] call BIS_fnc_guiMessage; if(_action) then { life_cash = life_cash + _value; hint format [localize "STR_ANOTF_Success",[_value] call life_fnc_numberText]; closeDialog 0; } else { hint localize "STR_NOTF_ActionCancel"; closeDialog 0; }; </pre> <p>13.  <strong>core\admin\fn_adminDebugCon.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminDebugCon.sqf Author: ColinM9991 Description: Opens the Debug Console. */ if(GETC(life_adminlevel) < 3) exitWith {closeDialog 0; hint "You have no business using this";}; createDialog "RscDisplayDebugPublic"; [[0,format["Admin %1 has opened the Debug Console.",profileName]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP; </pre> <p>14. <strong>core\admin\fn_adminGodMode.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminGodMode.sqf Author: Tobias 'Xetoxyc' Sittenauer Description: Enables God mode for Admin */ if(GETC(life_adminlevel) < 3) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";}; [] spawn { while {dialog} do { closeDialog 0; sleep 0.01; }; }; if(life_god) then { life_god = false; titleText ["God mode disabled","PLAIN"]; titleFadeOut 2; player allowDamage true; } else { life_god = true; titleText ["God mode enabled","PLAIN"]; titleFadeOut 2; player allowDamage false; }; </pre> <p>15. <strong>core\admin\fn_adminFreeze.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminFreeze.sqf Author: ColinM9991 Description: Freezes selected player */ if(GETC(life_adminlevel) < 3) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";}; private["_unit"]; _unit = lbData[2902,lbCurSel (2902)]; _unit = call compile format["%1", _unit]; if(isNil "_unit") exitWith {}; if(isNull _unit) exitWith {}; if(_unit == player) exitWith {hint localize "STR_ANOTF_Error";}; [[player],"life_fnc_freezePlayer",_unit,false] spawn life_fnc_MP; </pre> <p>16 . <strong>core\admin\fn_adminMarkers.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_adminMarkers.sqf Sourced from Lystics Player Markers Loop / if(GETC(life_adminlevel) < 3) exitWith {closeDialog 0; hint localize "STR_ANOTF_ErrorLevel";}; life_markers = !life_markers; if(life_markers) then { PlayerMarkers = []; FinishedLoop = false; hint localize "STR_ANOTF_MEnabled"; while{life_markers} do { { if !(_x in allUnits) then { deleteMarkerLocal str _x; }; } forEach PlayerMarkers; PlayerMarkers = []; { if(alive _x && isplayer _x) then { deleteMarkerLocal str _x; _pSee = createMarkerLocal [str _x,getPos _x]; _pSee setMarkerTypeLocal "mil_triangle"; _pSee setMarkerPosLocal getPos _x; _pSee setMarkerSizeLocal [1,1]; _pSee setMarkerTextLocal format['%1',_x getVariable["realname",name _x]]; _pSee setMarkerColorLocal ("ColorRed"); PlayerMarkers = PlayerMarkers + [_x]; }; } forEach allUnits; sleep 0.2; }; FinishedLoop = true; } else { if(isNil "FinishedLoop") exitWith {}; hint localize "STR_ANOTF_MDisabled"; waitUntil{FinishedLoop}; { deleteMarkerLocal str _x; } forEach PlayerMarkers; }; </pre> <p>17. <strong>core\configuration.sqf</strong></p> <pre class="ipsCode prettyprint"> life_god = false; //Add this life_frozen = false; //And this life_markers = false; //Finally this </pre> <p>18 . <strong>Nouveau fichier dans core\civilian est nommé le </strong><strong>fn_freezePlayer.sqf</strong></p> <pre class="ipsCode prettyprint"> #include <macro.h> / File: fn_freezePlayer.sqf Author: ColinM9991 Description: Freezes selected player */ private["_admin"]; _admin = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; if(life_frozen) then { hint localize "STR_NOTF_Unfrozen"; [[1,format[localize "STR_ANOTF_Unfrozen",profileName]],"life_fnc_broadcast",_admin,false] spawn life_fnc_MP; disableUserInput false; life_frozen = false; } else { hint localize "STR_NOTF_Frozen"; [[1,format[localize "STR_ANOTF_Frozen",profileName]],"life_fnc_broadcast",_admin,false] spawn life_fnc_MP; disableUserInput true; life_frozen = true; }; </pre> <p>Voila , aurevoir et au fait je suis de retour </p>
  • Ajouter la bourse !

    12
    0 Votes
    12 Posts
    5k Views
    vfrzV
    <p>Bonjour à tous, aujourd'hui je vais traduire un tutoriel pour ajouter la bourse, source : altisliferpg.com<br/><br/> 1 - Allez dans votre functions.h et ajouter ceci à la fin :</p> <pre class="ipsCode prettyprint lang-auto"> 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;};</pre> <p>Dans le fichier functions.h à nouveau, ajouter ceci en dessous de la class functions :</p> <pre class="ipsCode prettyprint lang-auto"> class Functions{ file = "core\functions"; class randomRound {}; // <--------- add this};</pre> <p>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 class="ipsCode prettyprint lang-auto"> #include "common_EditorWrapper.hpp"#include "market.hpp"</pre> <p>3 - Ouvrez votre fn_virt_sell.sqf dans core/shops<br/><br/> Ajoutez à private ceci ["_marketprice"];<br/> Comme ceci :</p> <pre class="ipsCode prettyprint lang-auto"> private["_type","_index","_price","_var","_amount","_name","_marketprice"];</pre> <p>Maintenant trouver cette ligne :</p> <pre class="ipsCode prettyprint lang-auto"> _price = (GETC(sell_array) select _index) select 1;_var = [_type,0] call life_fnc_varHandle;</pre> <p>Ajoutez ceci en dessous :</p> <pre class="ipsCode prettyprint lang-auto"> _marketprice = [_type] call life_fnc_marketGetSellPrice;if(_marketprice != -1) then{ _price = _marketprice;};</pre> <p>Trouvez cette ligne :</p> <pre class="ipsCode prettyprint lang-auto"> life_cash = life_cash + _price;</pre> <p>Ajoutez ceci en dessous :</p> <pre class="ipsCode prettyprint lang-auto"> if(_marketprice != -1) then { [_type, _amount] spawn { sleep 120; [_this select 0,_this select 1] call life_fnc_marketSell; };};</pre> <p>4- Fermer le fichier et ouvrer le fichier fn_virt_update.sqf dans le même dossier<br/><br/> Ajoutez à private ceci ["_marketprice"];<br/> Comme ceci :</p> <pre class="ipsCode prettyprint lang-auto"> private["_type","_index","_price","_var","_amount","_name","_marketprice"];</pre> <p>Maintenant trouvez cette ligne :</p> <pre class="ipsCode prettyprint lang-auto"> _price = (GETC(buy_array) select _index) select 1;</pre> <p>Ajoutez ceci en dessous:</p> <pre class="ipsCode prettyprint lang-auto"> marketprice = [_x] call life_fnc_marketGetBuyPrice;if(_marketprice != -1) then{ _price = _marketprice;};</pre> <p>A la fin du fichier ajoutez ceci :</p> <pre class="ipsCode prettyprint lang-auto"> //Call short view here[_shop_data select 1] spawn life_fnc_marketShortView;</pre> <p>Comme ceci :</p> <pre class="ipsCode prettyprint lang-auto"> if(_val > 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</pre> <p>5 - Fermer le fichier et ouvrez fn_virt_buy.sqf aussi dans le même dossier<br/><br/> Ajoutez à private ceci :</p> <pre class="ipsCode prettyprint lang-auto"> "_marketprice"</pre> <p>Comme ceci :</p> <pre class="ipsCode prettyprint lang-auto"> private["_type","_price","_amount","_diff","_name","_hideout","_marketprice"];</pre> <p>Trouvez cette ligne :</p> <pre class="ipsCode prettyprint lang-auto"> _amount = ctrlText 2404;</pre> <p>Ajoutez ceci en dessous:</p> <pre class="ipsCode prettyprint lang-auto"> _marketprice = [_type] call life_fnc_marketGetBuyPrice;if(_marketprice != -1) then{ _price = _marketprice;};</pre> <p>Trouvez cette ligne :</p> <pre class="ipsCode prettyprint lang-auto"> SUB(life_cash,(_price * _amount));</pre> <p>Ajoutez ceci en dessous:</p> <pre class="ipsCode prettyprint lang-auto"> if(_marketprice != -1) then { //##94 [_type, _amount] spawn { sleep 120; [_this select 0,_this select 1] call life_fnc_marketBuy; }; };</pre> <p>6 - Ouvrer le fichier dialog\player_inv.hpp<br/><br/> En dessous de ceci :</p> <pre class="ipsCode prettyprint lang-auto"> 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);};</pre> <p>Ajoutez ceci :</p> <pre class="ipsCode prettyprint lang-auto"> 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);};</pre> <p>Ouvrez le fichier init.sqf dans VOTRENOMDEMISSION\init.sqf et en dessous de :</p> <pre class="ipsCode prettyprint lang-auto"> [] execVM "briefing.sqf"; //Load Briefing[] execVM "KRON_Strings.sqf";</pre> <p>Ajoutez ça :</p> <pre class="ipsCode prettyprint lang-auto"> if(isDedicated && 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";};</pre> <p>Et pour la dernière étape allez dans core\fsm and déplacer le fichier server.fsm dispo dans le .zip<br/><br/> Désormais vous avez votre système de bourse, enjoy <br/><br/> Pour le kick par BattlEye, il suffit d'ajouter ces lignes dans Battleye\publicvariable.txt :</p> <pre class="ipsCode prettyprint lang-auto"> 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"</pre> <p>Maintenant pour la version 3.1.4.6+ changez le fichier fn_virt_sell.sqf danscore/shops remplacez le par ceci :</p> <pre class="ipsCode prettyprint lang-auto"> #include <macro.h>/* 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 > (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]; };};</pre> <p>Merci à : Linxy pour son aide<br/><br/> Touts les fichiers nécessaire (.zip) : <a href="https://mega.co.nz/#!fZFQjJbB!OGIlZTYFW-ZT-czIiOE8k6GPBFa056TcJTR8u9T6jS8" rel="external nofollow">https://mega.co.nz/#!fZFQjJbB!OGIlZTYFW-ZT-czIiOE8k6GPBFa056TcJTR8u9T6jS8</a><br/><br/><br/> Patch 3.1.4.8: Copiez les fichiers suivant spécifiques :<br/><br/> fn.Virt_sell.sqf</p> <pre class="ipsCode prettyprint lang-auto"> #include <macro.h>/* 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 > (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]; };};</pre> <p>fn.virt_update.sqf</p> <pre class="ipsCode prettyprint lang-auto"> #include <macro.h>/* 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 > 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;</pre> <p>And a little exemple for fix the xxxxxx in the market:</p> <pre class="ipsCode prettyprint lang-auto"> ["apple", 100, 50, 150, 4, 2, [ ["peach",1] <------- no coma ] ], and for long line["cement", 2250, 250, 4250, 4, 2, [ ["diamondc",1], <------- coma ["oilp",1], <------- coma ["iron_r",1], <------- coma ["copper_r",1], <------- coma ["salt_r",1], <------- coma ["glass",1] <------- no coma ] ], Last items in your configurationmarket ["heroinp", 7000, 3000, 10000, 4, 4, [ ["marijuana",1], <------- coma ["turtle",1], <------- coma ["cocainep",1] <------- no coma ] ] <------- no coma</pre> <p>Crédit : _Fuzz pour le tutoriel sur altisliferpg.com et EdgeKiller pour la traduction !</p>
  • Mettre du nitro

    4
    0 Votes
    4 Posts
    2k Views
    hamzadamsH
    <p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;text-align:center;"><span style="font-family:georgia, serif;"><span style="font-size:24px;">Mettre du nitro </span></span></p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;text-align:center;"><span style="font-size:18px;">Adapter pour la version 3.1.4.8 (La dernière de itsyuka)</span></p><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Pour commencer on va créée l'item "nitro" :</p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Vous aller dans le fichier fn_VarHandle.sqf pour y rajoutez  dans la case 0 dans le switch</p><pre class="ipsCode prettyprint">case 0: { switch (_mode) do { case 0: { switch (_var) do { case "nitro": {"life_inv_nitro"}; }; };</pre><p><span style="color:rgb(40,40,40);font-family:georgia, serif;line-height:22.4px;">Maintenant vous aller juste en bas dans case 1</span></p><pre class="ipsCode prettyprint">case 1: { switch (_var) do { case "life_inv_nitro": {"nitro"}; }; }; };</pre><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Voila maintenant l'items créer on va le configurer pour ça il faut aller dans le fichier Config_Master.hpp</span></p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">puis aller dans la class VirtuelItems </span></p><pre class="ipsCode prettyprint">//Virtual Items class VirtualItems { VITEMMACRO(nitro,"Nitro",nitro,5,1500,0,-1,false,-1,"") }; </pre><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Voila vous rajouter ça puis vous pouvez configurer le poids le prix ... </span></p><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">et pour terminer la config il faut aller dans le fichier fn_useItem.sqf</span></p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Vous rajouter ça a la fin avant Default </span>  </p><pre class="ipsCode prettyprint">case (EQUAL(_item,"nitro")): { if(vehicle player != player) exitWith {hint "Nitro Activer"}; [] spawn life_fnc_nitroUse; else { hint format ["Il faut etre dans un vehicule pour utiliser %1",player ] } }; </pre><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Puis vous allez dans le fichier de configuration des touches fn_KeyHandler.sqf</span></p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">vous rajouter ça ou vous voulez de façon logique bien sur ^^ </span></p><pre class="ipsCode prettyprint">//N Touche Nitro case 49: if([false,"nitro",1] call life_fnc_handleInv) then { [] spawn life_fnc_nitroUse; } }</pre><p><span style="color:rgb(40,40,40);font-family:georgia, serif;line-height:22.4px;">Pour finir vous créer un fichier fn_nitroUse.sqf dans \Altis-Life-master\extDB-Build\Altis_Life.Altis\core\items</span></p><pre class="ipsCode prettyprint">/*fn_nitroUse.sqf Adapter pour altis life par HamzaDams By: Hellop 2008 Copyright: Released to the Public Domain. It would be cool if you gave me credit in your mission if you use it. Purpose: Simulate Nitrous Oxide speed-boost for vehicles. Sets global variable on client computer, cli_nitroLock so that the nitro can't be engaged more than once at at time. Pre: 1. Global var: cli_nitroLock = true; 2. Player's vehicle has an action menu item enabled that runs this script. e.g. in the initline of a car/tank: this addEventHandler ["getin", { if ((_this select 1) == "driver") then { actionIDNitro = _this select 0 addAction ["Nitro", "client\action\fn_nitroUse.sqf"]; }; }]; this addEventHandler ["getout", {_this select 0 removeAction actionIDNitro;}]; Post: cli_nitroLock is set to true; Testing: 5 min. reverse doesn't work. Would be nice if it worked dynamically from vehicle weight/maxspeed. Air Vehicles not tested. */ private ["_obj", "_vel", "_tmrInterval", "_dir", "_maxSpeed"]; _actionID = _this select 2; _obj = vehicle player; //Tanks and stuff get less nitro. _tmrInterval = .1; _maxSpeed = 120; _speedMultiplier = .4; //2 is good for cars, too much for tanks _nitroDuration = 5; if ((typeOf _obj) isKindOf "Car") then { _tmrInterval = .02; _maxSpeed = 180; _speedMultiplier = 1.5; }; if ((typeOf _obj) isKindOf "Air") then { _tmrInterval = .02; _maxSpeed = 500; //What is best val here? _speedMultiplier = .3; }; if ((typeOf _obj) isKindOf "Motorcycle") then { _tmrInterval = .02; _maxSpeed = 140; //What is best val here? _speedMultiplier = .2; }; //Initialize vars; _vel = 0; _velX = 0; _velY = 0; _velZ =0; _dir = 0; _sinDir = 0; _cosDir = 0; _previousVel = velocity _obj; _previousSpeed = speed _obj; _curSpeed = 0; if ((speed _obj) <= 3) then { player sideChat format ["Vous devez être en mouvement pour activer Nitro."]; } else { if (cli_nitroLock) then { cli_nitroLock = false; player sideChat format ["Nitro engagé."]; //player globalchat format["Time: %1, Vehicle Type: %2, MaxSpeed: %3", time, typeOf _obj, _maxSpeed]; _startTime = time; _tmpSpeedMultiplier = _speedMultiplier; while {(time - _startTime) < _nitroDuration} do { sleep _tmrInterval; _vel = velocity _obj; _curSpeed = (speed _obj); if (((abs _curSpeed) - (abs _previousSpeed)) > 30) then {_vel = _previousVel}; //To prevent getting thrown far in collisions _velX = _vel select 0; _velY = _vel select 1; _velZ = _vel select 2; _dir = getdir _obj; //player globalChat format ["Speed: %1", speed _obj]; if ((speed _obj) > _maxSpeed) then {_tmpSpeedMultiplier = 0} else {_tmpSpeedMultiplier = _speedMultiplier}; _sinDir = _tmpSpeedMultiplier*(sin _dir); _cosDir = _tmpSpeedMultiplier*(cos _dir); _obj setvelocity [_velX + _sinDir, _velY + _cosDir, _velZ -.1]; //Keep Z vector moving with gravity _previousSpeed = _curSpeed; _previousVel = _vel; }; cli_nitroLock = true; player sideChat format ["Test Nitro Fait ! Vel: %1. Dir: %2, Speed: %3", velocity _obj, direction _obj, speed _obj]; }; };</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Voila j’espère ça marchera pour tout le monde et que j'ai été le plus claire ^^ Faite moi des retour</span></p>
  • Sauvegarder l'essence du véhicule dans la DB

    5
    0 Votes
    5 Posts
    2k Views
    hamzadamsH
    <p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;text-align:center;"><span style="font-family:georgia, serif;"><span style="font-size:24px;">Sauvegarder l'essence dans la DB</span></span></p><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;text-align:center;">Ce tutoriel fonctionne pour les version 3.1.x pour la version 4.0 je ferais un tuto quand j'aurai le temps</p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Ajouter une table sur votre base de donnée MySql</span></p><pre class="ipsCode prettyprint">ALTER TABLE vehicles ADD fuel VARCHAR(16) NOT NULL DEFAULT '1'</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Ensuite aller dans le fichier \extDB-Build\life_server\Functions\Systems\fn_cleanup.sqf</span></p><pre class="ipsCode prettyprint">_query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,fuel _veh];</pre><p><span style="color:rgb(40,40,40);font-family:georgia, serif;line-height:22.4px;">il faut juste aller dans la variable "_query" et ajouter </span></p><pre class="ipsCode prettyprint">fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,fuel _veh</pre><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">à coter de "active ='0"  </span></p><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"> </p><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Maintenant vous aller dans le fichier </span>fn_vehicleStore.sqf </p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Puis vous aller en bas de </span>if(_impound) <span style="font-family:georgia, serif;">et la vous aurai une variable qui s'appelle _query et vous modifier cette ligne de code</span></p><pre class="ipsCode prettyprint">_query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate, fuel _vehicle];</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Maintenant vous rester dans le même fichier et en bas vers la ligne 52 pour mon cas il y'au une autre var _query vous la modifier puis vous mettez la même chose c'est à dire :</span></p><pre class="ipsCode prettyprint">_query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate, fuel _vehicle];</pre><p style="margin:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;"><span style="font-family:georgia, serif;">Maintenant vous aller dans le fichier </span>fn_spawnVehicle.sqf</p><p style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">et vous faite la même procédure vous changer la variable _query par :</p><pre class="ipsCode prettyprint">_query = format["SELECT id, side, classname, type, pid, alive, active, plate, color, fuel FROM vehicles WHERE id='%1' AND pid='%2'",_vid,_pid];</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Puis juste en bas de cette var vous rajouter :</span></p><pre class="ipsCode prettyprint">_fuel = parseNumber(_queryResult select 9);</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">puis enfin pour terminer vous ajouter ce code en bas de "_vehicle setDir _dir;"</span></p><pre class="ipsCode prettyprint">_vehicle setFuel _fuel;</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">Ce qui donne :</span></p><pre class="ipsCode prettyprint">if(typeName _sp == "STRING") then { _vehicle = createVehicle[(_vInfo select 2),[0,0,999],[],0,"NONE"]; waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; _vehicle allowDamage false; _hs = nearestObjects[getMarkerPos _sp,["Land_Hospital_side2_F"],50] select 0; _vehicle setPosATL (_hs modelToWorld [-0.4,-4,12.65]); sleep 0.6; } else { _vehicle = createVehicle [(_vInfo select 2),_sp,[],0,"NONE"]; waitUntil {!isNil "_vehicle" && {!isNull _vehicle}}; _vehicle allowDamage false; _vehicle setPos _sp; _vehicle setVectorUp (surfaceNormal _sp); _vehicle setDir _dir; _vehicle setFuel _fuel;</pre><p><span style="color:rgb(40,40,40);font-family:helvetica, arial, sans-serif;line-height:22.4px;">J’espère pas avoir fait d'erreur et sinon pour le version 4.0 je ferais le plutôt possible </span></p><p>Et enfaîte je suis de retour sur melinyel <img alt=":D" src="emoticons/default_biggrin.png" title=":D"/></p>
  • Activer Zeus sur Altis Life

    11
    0 Votes
    11 Posts
    5k Views
    vfrzV
    <div>Bonjour,</div> <div> </div> <div>Voici un tutoriel pour activer Zeus sur son serveur Altis Life</div> <div> </div> <div>Crédit : Archangel_za pour son tutoriel sur altisliferpg.com et EdgeKiller pour la traduction (en cours...).</div> <div> </div> <div>- 1 -</div> <div> </div> <div>Dans votre fichier "core\init.sqf", vous devez ajouter une "case" pour le mode Zeus, donc en dessous de ceci :</div> <div> <pre class="ipsCode prettyprint"> switch (playerSide) do { case west: { _handle = [] spawn life_fnc_initCop; waitUntil {scriptDone _handle}; }; case civilian: { //Initialize Civilian Settings _handle = [] spawn life_fnc_initCiv; waitUntil {scriptDone _handle}; }; case independent: { //Initialize Medics and blah _handle = [] spawn life_fnc_initMedic; waitUntil {scriptDone _handle}; }; </pre> <p>Ajoutez ceci :</p> <pre class="ipsCode prettyprint"> case sideLogic: { _handle = [] spawn life_fnc_initZeus; waitUntil {scriptDone _handle}; }; </pre> <p>Avant la fin du switch.</p> <p> </p> <div>- 2 -</div> <div> </div> <div>Créer un fichier dans le dossier core nommé "fn_initZeus.sqf" et mettez ceci à l'intérieur :</div> <div> <pre class="ipsCode prettyprint"> /* File: fn_initZeus.sqf Author: John "Paratus" VanderZwet Description: Zeus Initialization file. */ player addRating 9999999; waitUntil {!(isNull (findDisplay 46))}; [] spawn life_fnc_copMarkers; if(life_adminlevel < 2) exitWith { endMission "Loser"; }; </pre> <div>- 3 -</div> <div> </div> <div>Ouvrez le fichier "functions.h" et en dessous de :</div> <div> <pre class="ipsCode prettyprint"> class Master_Directory { </pre> <p>Ajoutez :</p> <pre class="ipsCode prettyprint"> class initZeus {}; </pre> <div>- 4 -</div> <div> </div> <div> </div> <div>Allez dans l'éditeur:</div> <div> 1 • Ajoutez un module (Double clique)</div> <div> 2 • Pour la catégorie mettez "Zeus"</div> <div> 3 • Pour le module mettez "GameMaster"</div> <div> </div> <div>Les paramètres doivent être comme sur l'image suivante :</div> </div> </div> </div> <p> </p> <p><img alt="2nkkns9.jpg" src="<base_url>/applications/sslimageproxy/interface/image.php?url=http://i57.tinypic.com/2nkkns9.jpg"/></p> <p> </p> <div>Désormais Zeus est activé sur votre serveur Altis Life ! Have fun !</div> <div> </div> <div>PS : N'oubliez pas de vous connectez en tant qu'administrateur en tapant ceci dans le chat : #login <Admin Password></div>
  • Fenêtre pour le vendeur de licences

    9
    0 Votes
    9 Posts
    8k Views
    vfrzV
    <p> Bonjour, il s'agit d'un tutoriel assez simple, cependant il faut avoir un minimum de connaissances pour s'y retrouver !</p> <p> </p> <p>Crédit :</p> <p>-RichHomieQuan pour le tutoriel sur altisliferpg.com</p> <p>-Moi pour la traduction </p> <p> </p> <p>C'est parti !</p> <p> </p> <p>Ajoutez ceci dans le fichier functions.h, en dessous de "shops" :</p> <pre class="ipsCode prettyprint"> class licenses {};</pre> <p>Créez un fichier dans le dossier dialog, nommé LicensesDialog.hpp</p> <pre class="ipsCode prettyprint"> class LicenseShop { idd = 5546; name= "life_license_shop"; movingEnable = false; enableSimulation = true; onLoad = "uiNamespace setVariable [""LicenseShop"", _this select 0];"; objects[] = { }; class controls { class RscTitleBackground : Life_RscText { colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; idc = -1; text = "Licenses"; //--- ToDo: Localize; x = 0.1; y = 0.2; w = 0.775; h = 0.04; }; class Mainbackground : Life_RscText { colorBackground[] = {0,0,0,0.7}; idc = -1; x = 0.1; y = 0.244; w = 0.775; h = 0.52; }; class listbox: Life_RscListBox { idc = 55126; sizeEx = 0.035; x = 0.1125; y = 0.3; w = 0.3125; h = 0.4; }; class ShowLicenseslistbox: Life_RscListBox { idc = 55131; x = 0.55; y = 0.3; w = 0.3125; h = 0.4; }; class MyLicenses : Life_RscText { idc = 55130; text = "Available "; //--- ToDo: Localize; x = 0.1875; y = 0.24; w = 0.1375; h = 0.04; }; class ShowLicenses : Life_RscText { idc = 55129; text = "My Licenses"; //--- ToDo: Localize; x = 0.65; y = 0.24; w = 0.1375; h = 0.04; }; class buybutton: Life_RscButtonMenu { idc = 55127; text = "$STR_Global_Buy"; x = 0.4125; y = 0.72; w = 0.15; h = 0.04; colorText[] = {1,1,1,1}; colorBackground[] = {0,0,0,0.8}; action = "if( (lbData[55126,lbCurSel (55126)] != """") ) then { [false, false, false, lbData[55126,lbCurSel (55126)]] call life_fnc_buyLicense; closeDialog 0; };"; }; }; }; </pre> <div>Créez un fichier nommé fn_licenses.sqf dans core/shops :</div> <div> <pre class="ipsCode prettyprint"> private["_display","_listbox","_shortname","_longname","_price","_hasLicense","_displayname"]; _buyables = _this select 3; //called from action => select 3rd argument if(!dialog) then { if(!(createDialog "LicenseShop")) exitWith {}; }; disableSerialization; _display = findDisplay 5546; if(isNull _display) exitWith {}; _listbox = _display displayCtrl 55126; _mylic = _display displayCtrl 55131; _struct = ""; { _shortname = _x; _longname = ([_shortname, 0] call life_fnc_licenseType) select 0; _displayname = ([_shortname, 0] call life_fnc_licenseType) select 1; _price = [_shortname] call life_fnc_licensePrice; _hasLicense = missionNamespace getVariable _longname; if(!_hasLicense) then { _listbox lbAdd format["%1 ($%2)", _displayname, _price]; _listbox lbSetData [(lbSize _listbox) - 1, _shortname]; } else { _mylic lbAdd format["%1", _displayname]; _mylic lbSetData [(lbSize _mylic) - 1, _shortname]; }; } foreach _buyables; </pre> <p>Il va falloir aussi changer l'initialisation des pnjs comme ceci (exemple) :</p> </div> <pre class="ipsCode prettyprint"> this addAction["Licenses",life_fnc_licenses,["driver","boat","pilot","truck","home","gun"],0,true,true,"",' playerSide == civilian ']; </pre> <p>Au lieu de :</p> <pre class="ipsCode prettyprint"> this addAction[format[""%1 ($%2)"",[""license_civ_driver""] call life_fnc_varToStr,[([""driver""] call life_fnc_licensePrice)] call life_fnc_numberText],life_fnc_buyLicense,""driver"",0,false,false,"""",' !license_civ_driver && playerSide == civilian ']; ... </pre> <p>Voici un petit screenshot pour la fin :</p> <p><img alt="43af8e7fe6f0e28f936844c624531f97.png" src="https://i.gyazo.com/43af8e7fe6f0e28f936844c624531f97.png"/></p>
  • [TUTO] Braquage de Station service

    3
    0 Votes
    3 Posts
    2k Views
    matthieuM
    <p>Bonsoir à tous, comme je n'ai pas vu de tuto encore sur ca sur le forum, je me propose pour en faire un.<br/><br/><br/> 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><br/> 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 class="ipsCode prettyprint"> 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 {}; </pre> <pre class="ipsCode prettyprint"> class robShops {}; //Voler station service </pre> <p>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 class="ipsCode prettyprint"> /* 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 > 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 < 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 < 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 >= 1) exitWith {}; if(_robber distance _shop > 10.5) exitWith { }; if!(alive _robber) exitWith {}; }; if!(alive _robber) exitWith { _rip = false; }; if(_robber distance _shop > 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 ""; </pre> <p>Pour finir, allez sur votre editeur de map, <strong>rajoutez un PNJ civil <span style="color:#ff0000;">non jouable</span></strong> et mettez ceci dans son initialisation</p> <pre class="ipsCode prettyprint"> this addAction["Rob Cash Register",life_fnc_robShops];</pre> <p><a class="attach-link" href="/assets/uploads/ips/monthly_05_2015/post-225-0-86332400-1431000726.jpg"><img alt="post-225-0-86332400-1431000726_thumb.jpg" src="/assets/uploads/ips/monthly_05_2015/post-225-0-86332400-1431000726_thumb.jpg" width="100"/></a></p>
  • Tutoriel Interface Phone

    5
    0 Votes
    5 Posts
    3k Views
    ArrowDarkA
    <p>Salut , avant de commencé je tiens a dire que les scripts et le tuto ne viens pas de moi , il vienne de V0xid, qu'on remercie énormement pour se bouleau .</p> <p></p><p>Lien originale : <a href="http://altisdev.com/index.php?/topic/1426-interface-téléphone-iphone/" rel="external nofollow">http://altisdev.com/index.php?/topic/1426-interface-téléphone-iphone/</a></p> <p></p><p>Maintenant :</p> <p> </p> <p style="text-align:center;"><span style="font-size:48px;"><strong>LE TUTO</strong></span></p> <p style="text-align:center;"> </p> <p><b>1) Téléchargé le .rar : </b><span style="font-size:14px;"><a href="http://altisdev.com/index.php?app=core&amp;module=attach&amp;section=attach&amp;attach_id=125" rel="external nofollow">http://altisdev.com/index.php?app=core&amp;module=attach&amp;section=attach&amp;attach_id=125</a></span></p> <p> </p> <p><span style="font-size:14px;">2) <strong>Mettez le telephone</strong></span><strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);">.paa" dans votre dossier textures.</span></span></strong></p> <p> </p> <p>3) <strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);">Remplacer le fichier cell_phonne.hpp "dialog\cell_phone.hpp" .</span></span></strong></p> <p> </p> <p><strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);">4)  Remplacer le fichier common.hpp "dialog\common.hpp"</span></span></strong></p> <p> </p> <p><strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);">Et voila , c'est finit , un petit screenshot pour voir a quoi cela ressemble </span></span></strong></p> <p> </p> <p><strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);"><img alt="494700107410screenshots2014112200005.jpg" src="<base_url>/applications/sslimageproxy/interface/image.php?url=http://img4.hostingpics.net/pics/494700107410screenshots2014112200005.jpg"/></span></span></strong></p> <p> </p> <p><strong><span style="font-size:14px;"><span style="color:rgb(0,0,0);">Encore Merci a V0xid Aurevoir tout le monde </span></span></strong></p>
  • Sauvegarde automatique • Altis Life

    12
    0 Votes
    12 Posts
    7k Views
    vfrzV
    <p>Bonjour !</p> <p> </p> <p>Voici un tutoriel pour ajouter la sauvegarde automatique (5-10-15 minutes) sur Altis Life.</p> <p> </p> <p><u>Fichier : "core\init.sqf"</u></p> <p> </p> <p>En dessous de :</p> <pre class="ipsCode prettyprint"> [] call life_fnc_setupActions; </pre> <p>Placez ceci  :</p> <pre class="ipsCode prettyprint"> [] spawn life_fnc_autoSave; </pre> <p><u>Fichier : "core\functions\fn_autoSave.sqf"</u></p> <p> </p> <p>Créez le nouveau fichier fn_autoSave.sqf dans le dossier "core\functions", puis mettez ceci à l'intérieur :</p> <pre class="ipsCode prettyprint"> /* @Version: 0.2 @Author: EdgeKiller & =IFD= Cryptonat @Edited: 5/04/2014 Description: Sauvegarde l'inventaire toutes les x secondes. */ while {true} do { sleep 600; //Temps entre chaque sauvegarde en seconde if (alive player) then { if (playerside == west) then { [] call life_fnc_sessionUpdate; [] call life_fnc_saveGear hint "Jeu sauvegardé." } else { [] call life_fnc_sessionUpdate; hint "Jeu sauvegardé." }; }; }; </pre> <p>Vous pouvez enlever les lignes de "hint" si vous ne voulez pas avoir de message lorsque la sauvegarde auto se fait.</p> <p> </p> <p><u>Fichier : functions.h</u></p> <p> </p> <p>Dans la classe function, ajoutez ceci :</p> <pre class="ipsCode prettyprint"> class autoSave {}; </pre> <p>Et voila désormais le jeu sera sauvegarder automatiquement toutes les x secondes ! (600 secondes = 10 minutes )</p> <p></p>
  • 101 Editor | Mapping

    Pinned
    9
    0 Votes
    9 Posts
    4k Views
    ArrowDarkA
    <p>Salut , je viens vous faire partagé un mod très utile pour vos session de mapping , il va permettre de faire spawn la quasi totalité les objet d'arma , maisons , chateau , hopital ... ect</p> <p> </p> <p>Je tien a dire que vous n'aurez pas besoin de faire téléchargé ce mod a vos joueurs si vous décidé de l'utilisé ! </p> <p> </p> <p>Lien de download : <a href="http://www.armaholic.com/page.php?id=20821" rel="external nofollow">http://www.armaholic.com/page.php?id=20821</a></p> <p> </p> <p>Voila !</p> <p> </p> <p>Bye Bye</p>
  • Créer une safezone

    12
    0 Votes
    12 Posts
    5k Views
    S
    <p>Source : <a href="http://altisdev.com/index.php?/topic/153-ajouter-des-safe-zones-script-anti-tir-dans-ces-zones/" rel="external nofollow">http://altisdev.com/index.php?/topic/153-ajouter-des-safe-zones-script-anti-tir-dans-ces-zones/</a><br/>  <br/><strong>1 -  Ouvrez votre mission.sqm avec l'éditeur Arma III</strong><br/>  <br/><strong>2 - Inserez un marqueur => Ellipse => Entrez un nom "<span style="color:#ff0000;">safepyrgos</span>" et Axe A et B = <span style="color:#ff0000;">400</span></strong><br/>  <br/><strong>2a - Faites de même avec d'autres endroits sur la map.</strong><br/>  <br/><strong>3 - Sauvegardez votre mission.</strong><br/>  <br/>  <br/> ---------------------------------------------------------------------<br/>  <br/><strong>4 - Créez un fichier "safezone.sqf" et mettez le dans un dossier "scripts"</strong><br/><br/> DESCRIPTION:<br/> Tue joueur tirant dans une zone safe<br/><br/> CONFIGURATION:<br/> Edit the #defines below.<br/> */<br/>  </p> <pre class="ipsCode prettyprint lang-auto"> #define SAFETY_ZONES [["Safe_Kav", 600],["safepyrgos", 400]] // Syntax: [["marker1", radius1], ["marker2", radius2], ...] #define MESSAGE "Tu es mort car tu as tiré dans une safe zone" if (isDedicated) exitWith {}; waitUntil {!isNull player}; switch (playerSide) do {     case west:     {};          case civilian:     { player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then { deleteVehicle (_this select 6);              titleText [MESSAGE, "PLAIN", 3];              player setDamage 1; //Pan t'es mort              hint parseText format["<t color='#01B0F0'><t size ='2.5'<t align='center'>Safe Zone<br/><t color='#FFFFFF'><t align='center'><t size='1.5'>Pas de tirs<br/><t color='#FFFFFF'><t align='center'><t size='1.5'>Pas de vols<br/><t color='#FFFFFF'><t align='center'><t size='1.5'>Pas de braquage<br/><t"];              }; }];     }; };</pre> <p><u><strong>5 - Dans "init.sqf", ajoutez :</strong></u><br/> [] execVM "scripts\safezone.sqf";<br/>  <br/> Voilà, amusez vous bien </p>
  • Système de craft par EdgeKiller

    10
    0 Votes
    10 Posts
    7k Views
    vfrzV
    <p>Bonsoir tout le monde !</p> <p> </p> <p>Ce soir je vous partage un système de craft que j'ai créer complétement moi même, donc exclusif !</p> <p> </p> <p>Petit aperçu : </p> <p> </p> <p>https://www.youtube.com/watch?v=BJegFHppdkc</p> <p> </p> <p><u>A faire :</u></p> <p>- Traduire le script en allemand/italien/portugais</p> <p>- Système de filtrage pour les vêtements/armes etc...</p> <p></p><p>• Fichier "Functions.h", mettez ceci dans la class "Action" :</p> <pre class="ipsCode prettyprint"> class craftAction {}; </pre> <p>Dans la class "Config" :</p> <pre class="ipsCode prettyprint"> class craftCfg {}; </pre> <p>Puis dans la class "Player_Menu" : </p> <pre class="ipsCode prettyprint"> class craft {}; class craft_update {}; </pre> <p>• Fichier "dialog\MasterHandler.h", ajoutez :</p> <pre class="ipsCode prettyprint"> #include "craft.hpp" </pre> <p>• Fichier "dialog\player_inv.hpp", remplacez :</p> <pre class="ipsCode prettyprint"> class ButtonAdminMenu : Life_RscButtonMenu { idc = 2021; text = "$STR_PM_AdminMenu"; onButtonClick = "createDialog ""life_admin_menu"";"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.805; w = (6.25 / 40); h = (1 / 25); }; </pre> <p>Par :</p> <pre class="ipsCode prettyprint"> class ButtonAdminMenu : Life_RscButtonMenu { idc = 2021; text = "$STR_PM_AdminMenu"; onButtonClick = "createDialog ""life_admin_menu"";"; x = 0.1 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); y = 0.805; w = (6.25 / 40); h = (1 / 25); }; </pre> <p>Puis en dessous ajoutez ceci :</p> <pre class="ipsCode prettyprint"> class ButtonCraft : Life_RscButtonMenu { idc = 2025; text = "$STR_PM_Craft"; onButtonClick = "createDialog ""Life_craft"";"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.805; w = (6.25 / 40); h = (1 / 25); }; </pre> <p>• Fichier "stringtable.xml", ajoutez :</p> <pre class="ipsCode prettyprint"> <Package name="Craft"> <Key ID="STR_CRAFT_Title"> <Original>Crafting Menu</Original> <English>Crafting Menu</English> <German>Crafting Menu</German> <French>Menu de Crafting</French> <Italian>Crafting Menu</Italian> <Portuguese>Crafting Menu</Portuguese> </Key> <Key ID="STR_PM_CraftStats"> <Original>Object to craft</Original> <English>Object to craft</English> <German>Object to craft</German> <French>Objet à crafter</French> <Italian>Object to craft</Italian> <Portuguese>Object to craft</Portuguese> </Key> <Key ID="STR_PM_CraftMaterials"> <Original>Materials needed</Original> <English>Materials needed</English> <German>Materials needed</German> <French>Materiaux requis</French> <Italian>Materials needed</Italian> <Portuguese>Materials needed</Portuguese> </Key> <Key ID="STR_CRAFT_Button"> <Original>Craft !</Original> <English>Craft !</English> <German>Craft !</German> <French>Craft !</French> <Italian>Craft !</Italian> <Portuguese>Craft !</Portuguese> </Key> <Key ID="STR_PM_NoMaterial"> <Original>You do not have all the required materials !</Original> <English>You do not have all the required materials !</English> <German>You do not have all the required materials !</German> <French>Vous n'avez pas tous les matériaux requis !</French> <Italian>You do not have all the required materials !</Italian> <Portuguese>You do not have all the required materials !</Portuguese> </Key> <Key ID="STR_CRAFT_Process"> <Original>You have crafted : %1</Original> <English>You have crafted : %1</English> <German>You have crafted : %1</German> <French>Vous avez crafté : %1</French> <Italian>You have crafted : %1</Italian> <Portuguese>You have crafted : %1</Portuguese> </Key> </Package> </pre> <p>Et ceci dans le package "Player_Menu" :</p> <pre class="ipsCode prettyprint"> <Key ID="STR_PM_Craft"> <Original>Craft</Original> <English>Craft</English> <German>Craft</German> <French>Craft</French> <Italian>Craft</Italian> <Portuguese>Craft</Portuguese> </Key> </pre> <p>• Dans le dossier "dialog" créer un fichier nommé "craft.hpp" :</p> <pre class="ipsCode prettyprint"> /* File: craft.hpp Description: Crafting System Created by EdgeKiller */ class Life_craft { idd = 666; name= "life_craft"; movingEnable = false; enableSimulation = true; onLoad = "[] spawn life_fnc_craft"; class controlsBackground { class Life_RscTitleBackground:Life_RscText { colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; idc = -1; x = 0.1; y = 0.2; w = 0.8; h = (1 / 25); }; class MainBackground:Life_RscText { colorBackground[] = {0, 0, 0, 0.7}; idc = -1; x = 0.1; y = 0.2 + (11 / 250); w = 0.8; h = 0.6 - (22 / 250); }; }; class controls { class Title : Life_RscTitle { colorBackground[] = {0, 0, 0, 0}; idc = 667; text = "$STR_CRAFT_Title"; x = 0.1; y = 0.2; w = 0.6; h = (1 / 25); }; class craftListHeader : Life_RscText { idc = 668; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; text = "$STR_PM_CraftStats"; sizeEx = 0.04; x = 0.105; y = 0.26; w = 0.275; h = 0.04; }; class craftList : life_RscListBox { idc = 669; sizeEx = 0.030; onLBSelChanged = "[] spawn life_fnc_craft_update"; x = 0.105; y = 0.31; w = 0.275; h = 0.44; }; class materialListHeader : Life_RscText { idc = 670; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; text = "$STR_PM_CraftMaterials"; sizeEx = 0.04; x = 0.395; y = 0.26; w = 0.275; h = 0.04; }; class materialList : Life_RscControlsGroup { idc = 671; w = 0.275; h = 0.44; x = 0.395; y = 0.30; class Controls { class mats : Life_RscStructuredText { idc = 672; sizeEx = 0.020; text = ""; x = 0; y = 0; w = 0.27; h = 0.44; }; }; }; class ButtonCraft : Life_RscButtonMenu { idc = 672; text = "$STR_CRAFT_Button"; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; onButtonClick = "if(!life_is_processing) then {[] spawn life_fnc_craftAction};"; x = 0.69; y = 0.26; w = (6.25 / 40); h = (1 / 25); }; class CloseButtonKey : Life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = 0.1; y = 0.8 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; }; }; </pre> <p>• Dans le dossier "core/actions", créer un fichier nommé "fn_craftAction.sqf" :</p> <pre class="ipsCode prettyprint"> /* File: fn_craftAction.sqf Author: EdgeKiller Description: Master handling for crafting an item. */ private["_dialog","_item","_itemInfo","_oldItem","_newItem","_upp","_itemName","_ui","_progress","_pgText","_cP","_allMaterial","_matsNeed","_invSize","_handledItem"]; disableSerialization; _dialog = findDisplay 666; if((lbCurSel 669) == -1) exitWith {hint localize "STR_ISTR_SelectItemFirst";}; _item = lbData[669,(lbCurSel 669)]; _allMaterial = true; _matsNeed = 0; if(!(player canAdd _item)) exitWith {hint localize "STR_NOTF_NoRoom";}; _config = ["weapon"] call life_fnc_craftCfg; { if(_item == _x select 0)then { _matsNeed = _x select 1; _invSize = count _matsNeed; for [{_i = 0},{_i &lt; _invSize - 1},{_i = _i + 2}] do { _str = [_matsNeed select _i] call life_fnc_varToStr; _matsNum = _matsNeed select _i+1; if((missionNamespace getVariable (_matsNeed select _i)) &lt; _matsNum) exitWith {_allMaterial = false;}; }; }; } foreach (_config select 1); if(!_allMaterial) exitWith {hint localize "STR_PM_NoMaterial";}; //Error checking if((count _matsNeed) == 0) exitWith {}; //Setup vars. _oldItem = _matsNeed; _newItem = _item; _itemInfo = [_newItem] call life_fnc_fetchCfgDetails; _itemName = _itemInfo select 1; _upp = format["Crafting %1",_itemName]; //Some more checks if((count _oldItem) == 0) exitWith {}; closeDialog 0; //Setup our progress bar. 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["%2 (1%1)...","%",_upp]; _progress progressSetPosition 0.01; _cP = 0.01; _removeItemSuccess = true; _invSize = count _oldItem; for [{_i = 0},{_i < _invSize - 1},{_i = _i + 2}] do { _handledItem = [_oldItem select _i,1] call life_fnc_varHandle; if(!([false,_handledItem,_oldItem select _i+1] call life_fnc_handleInv)) exitWith {_removeItemSuccess = false;}; }; if(!_removeItemSuccess) exitWith {5 cutText ["","PLAIN"]; life_is_processing = false;}; [] call life_fnc_p_updateMenu; life_is_processing = true; while{true} do { sleep 0.3; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["%3 (%1%2)...",round(_cP * 100),"%",_upp]; if(_cP >= 1) exitWith {}; }; _invSize = count _oldItem; if(!(player addItem _item)) exitWith { 5 cutText ["","PLAIN"]; for [{_i = 0},{_i &lt; _invSize - 1},{_i = _i + 2}] do { _handledItem = [_oldItem select _i,1] call life_fnc_varHandle; [true,_handledItem,_oldItem select _i+1] call life_fnc_handleInv; }; life_is_processing = false; }; 5 cutText ["","PLAIN"]; titleText[format[localize "STR_CRAFT_Process",_itemName],"PLAIN"]; life_is_processing = false; </pre> <p>• Dans le dossier "core/pmenu", créer un fichier nommé "fn_craft.sqf" :</p> <pre class="ipsCode prettyprint"> /* File: fn_craft.sqf Description: Crafting System Created by EdgeKiller Coder: EdgeKiller */ private["_dialog","_inv","_config","_itemInfo"]; //Declare all private variables if(!dialog) then { //Verify if the window is open createDialog "Life_craft"; }; disableSerialization; //Disable Serialization if(life_is_processing) exitWith{ closeDialog 2001; closeDialog 0; }; _dialog = findDisplay 666; //find the craft dialog/window _inv = _dialog displayCtrl 669; //find the listbox of items can be created lbClear _inv; //clear the listbox _config = ["weapon"] call life_fnc_craftCfg; { _itemInfo = [_x select 0] call life_fnc_fetchCfgDetails; _inv lbAdd format["%1",_itemInfo select 1]; //add a gun to the listbox _inv lbSetData[(lbSize _inv)-1,_itemInfo select 0]; //set the data of the gun _inv lbSetPicture[(lbSize _inv)-1,_itemInfo select 2]; } foreach (_config select 1); </pre> <p>• Dans le dossier "core/pmenu", créer un fichier nommé "fn_craft_update.sqf" :</p> <pre class="ipsCode prettyprint"> /* File: fn_craft_update.sqf Description: Crafting System Created by EdgeKiller Coder: EdgeKiller */ private["_dialog","_inv","_mats","_item","_struct","_str","_invSize","_matsNeed","_matsNum","_config"]; //Declare all private variables disableSerialization; //Disable Serialization _dialog = findDisplay 666; //find the craft dialog/window _inv = _dialog displayCtrl 669; //find the listbox of items can be created _mats = _dialog displayCtrl 672; _struct = ""; if((lbCurSel 669) == -1) exitWith {hint localize "STR_ISTR_SelectItemFirst";}; _item = lbData[669,(lbCurSel 669)]; _config = ["weapon"] call life_fnc_craftCfg; { if(_item == _x select 0)then { _matsNeed = _x select 1; _invSize = count _matsNeed; for [{_i = 0},{_i &lt; _invSize - 1},{_i = _i + 2}] do { _str = [_matsNeed select _i] call life_fnc_varToStr; _matsNum = _matsNeed select _i+1; _struct = _struct + format["%1x %2&lt;br/&gt;",_matsNum,_str]; }; }; } foreach (_config select 1); if(_struct == "") then { _struct = "No material needed"; }; _mats ctrlSetStructuredText parseText format[" <t size='0.8px'> %1 </t> ",_struct]; </pre> <p>• Pour finir dans le dossier "core/config", créer un fichier "fn_craftCfg.sqf" :</p> <pre class="ipsCode prettyprint"> #include <macro.h> /* File: fn_craftCfg.sqf Author: EdgeKiller Description: Master configuration file for the crafting menu. */ private["_craft"]; _craft = [_this,0,"",[""]] call BIS_fnc_param; if(_craft == "") exitWith {closeDialog 0}; //Bad shop type passed. switch(_craft) do { case "weapon": { switch(true) do { default { ["Weapons", [ //[Object classname, [item #1,quantity item #1,item #2,quantity item #2]],] ["hgun_P07_F", ["life_inv_goldbar",2,"life_inv_copperr",1]], ["SMG_01_F", ["life_inv_goldbar",6,"life_inv_copperr",3,"life_inv_ironr",3,"life_inv_diamondr",1]] ] ]; }; }; }; }; </pre> <p>Il s'agit du fichier du config, qui comprend donc les crafts, le script fonctionne pour les armes/habits/accessoires, tous les items de Arma 3. Il y a deux exmples de craft, je pense qu'il est assez facil de comprendre comment ca marche, donc je ne vais pas vous l'expliquer !</p> <p> </p> <p>Crédits : EdgeKiller</p> <p> </p> <p>Si vous utilisez ce système, merci de mettre les crédits </p> <p> </p> <p>ENJOY !</p>
  • [Tuto] Anti Alt F4

    9
    0 Votes
    9 Posts
    6k Views
    S
    <p>Bonjour à tous,</p> <p> </p> <p>Ce tutoriel n'est pas de moi, mais de <span>Pink3vil, voici le</span> lien : <a href="http://altisdev.com/index.php?/topic/271-anti-alt-f4-ctrl-alt-suppr-et-autres/" rel="external nofollow">http://altisdev.com/index.php?/topic/271-anti-alt-f4-ctrl-alt-suppr-et-autres/</a></p> <p> </p> <p>Fichier core\functions\fn_KeyHandler.sqf, ajoutez ceci :</p> <pre class="ipsCode prettyprint"> // ANTI ALT + F4 case 62: { if(_alt && !_shift) then { SOCK_fnc_updateRequest; diag_log format ["SERVEUR KOSMOS: %1 utilise ALT+F4 pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]; [[1,format["SERVEUR KOSMOS: %1 utilise ALT+F4 pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP; SOCK_fnc_updateRequest; }; }; // ANTI CTRL + ALT + DEL case 211: { if(_ctrlKey && _alt) then { SOCK_fnc_updateRequest; diag_log format ["SERVEUR KOSMOS: %1 utilise CTRL + ALT + DEL pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]; [[1,format["SERVEUR KOSMOS: %1 utilise CTRL + ALT + DEL pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP; SOCK_fnc_updateRequest; }; }; // ANTI CTRL + ESC case 1: { if( _ctrlKey ) then { SOCK_fnc_updateRequest; diag_log format ["SERVEUR KOSMOS: %1 utilise CTRL + ESC pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]; [[1,format["SERVEUR KOSMOS: %1 utilise CTRL + ESC pour se déconnecter (Prenez une capture et signalez le sur le Forum)",_player getVariable["realname",name _player]]],"life_fnc_broadcast",nil,false] spawn life_fnc_MP; SOCK_fnc_updateRequest; }; }; </pre> <p>Voilà j'espère que ça aidera certaines personnes si vous avez un soucis n'hésitez pas </p>
  • Fouiller un mort

    9
    0 Votes
    9 Posts
    3k Views
    S
    <p>Bonjour,</p> <p> </p> <p>Ce tuto est pas de moi mais de blah.</p> <p> </p> <p>Pour cela supprimez ceci du fichier <span style="color:rgb(40,40,40);font-family:Helvetica, helvetica, arial, sans-serif;">core/functions/fn_inventoryOpened.sqf :</span></p> <pre class="ipsCode prettyprint"> //Allow alive players who've been knocked out to be looted, just not the dead ones if(_container isKindOf "Man" && !alive _container) exitWith { hint localize "STR_NOTF_NoLootingPerson"; [] spawn { waitUntil {!isNull (findDisplay 602)}; closeDialog 0; }; }; </pre>
  • Désactiver SpyGlass

    1
    0 Votes
    1 Posts
    5k Views
    vfrzV
    <p>Yo tout le monde, aujourd'hui je vais vous montrez comment désactiver SpyGlass sur un serveur Altis Life.<br/>  <br/> Pour ce faire, ouvrez le fichier : Altis_Life.Altis/SpyGlass/fn_initSpy.sqf et ajoutez ceci :</p> <pre class="ipsCode prettyprint lang-auto"> exitWith {}; </pre> <p>Juste avant :</p> <pre class="ipsCode prettyprint lang-auto"> private["_binConfigPatches","_cfgPatches","_endM"]; </pre> <p>J'espère que ca vous aura aidé et bonne continuation </p>
  • Hex Color to Arma Color

    1
    0 Votes
    1 Posts
    2k Views
    vfrzV
    <p>Yo !</p> <p> </p> <p>Voici un site qui permet de convertir une couleur en hexadécimal vers le format de couleur de Arma !</p> <p><a href="http://killzonekid.com/hex-2-arma-gui-colour-converter/" rel="external nofollow">http://killzonekid.com/hex-2-arma-gui-colour-converter/</a></p> <p> </p> <p>J'espère que ça pourra vous aidez </p>
  • Systême de Remorquage (Igiload)

    8
    0 Votes
    8 Posts
    4k Views
    ArrowDarkA
    <p>Salut je viens vous faire un mini tuto pour comment installé un systême de remorquage sur votre serveur , ceci est extrêmement simple !</p> <p> </p> <p>1 . Téléchargé ce fichier et glissé le a la racine de votre Mission : <a href="https://www.mediafire.com/?oj2nmftyd8woz7a" rel="external nofollow" title="Lien externe">https://www.mediafir...oj2nmftyd8woz7a</a></p> <p> </p> <p>2. Ouvrez l'init.sqf qui se trouve à la racine de votre mission et rajotué ça a la fin :</p> <pre class="ipsCode prettyprint"> _igiload = execVM "IgiLoad\IgiLoadInit.sqf"; </pre> <p>Voila Plus qu'a sauvegardé et à redémarré le serveur !</p>
  • Liste "Keyboard UI Number"

    Pinned
    4
    0 Votes
    4 Posts
    2k Views
    vfrzV
    <p>Voici la liste des numéros correspondants aux touches, source : altisliferpg.com (midgetgrimm)</p> <pre class="ipsCode prettyprint"> ESC = 1 F1 = 59 F2 = 60 F3 = 61 F4 = 62 F5 = 63 F6 = 64 F7 = 65 F8 = 66 F9 = 67 F10 = 68 F11 = 87 F12 = 88 PRINT = 183 SCROLL = 70 PAUSE = 197 ^ = 41 1 = 2 2 = 3 3 = 4 4 = 5 5 = 6 6 = 7 7 = 8 8 = 9 9 = 10 0 = 11 ß = 12 ´ = 13 Ü = 26 Ö = 39 Ä = 40 = 43 < = 86 , = 51 . = 52 = 53 = NOT DEFINED POS1 = 199 TAB = 15 ENTER = 28 DELETE = 211 BACKSPACE = 14 INSERT = 210 END = 207 PAGEUP = 201 PAGEDOWN = 209 CAPS = 58 A = 30 B = 48 C = 46 D = 32 E = 18 F = 33 G = 34 H = 35 I = 23 J = 36 K = 37 L = 38 M = 50 N = 49 O = 24 P = 25 Q = 16 U = 22 R = 19 S = 31 T = 20 V = 47 W = 17 X = 45 Y = 44 Z = 21 SHIFTL = 42 SHIFTR = 54 UP = 200 DOWN = 208 LEFT = 203 RIGHT = 205 NUM_0 = 82 NUM_1 = 79 NUM_2 = 80 NUM_3 = 81 NUM_4 = 75 NUM_5 = 76 NUM_6 = 77 NUM_7 = 71 NUM_8 = 72 NUM_9 = 73 NUM_+ = 78 NUM = 69 NUM_/ = 181 NUM_* = 55 NUM_- = 74 NUM_, = 83 NUM_ENTER = 156 STRGL = 29 STRGR = 157 WINL = 220 WINR = 219 ALT = 56 SPACE = 57 ALTGR = 184 APP = 221 </pre>
  • [Obsolète] Créer un serveur Altis Life (Arma III) version 3.1.2 en local

    12
    0 Votes
    12 Posts
    5k Views
    vfrzV
    <p>Bonjour, bonsoir !</p> <p> </p> <p>Voici mon tutoriel vidéo pour créer un serveur Altis Life 3.1.2 en local (si sa intéresse quelqu'un ^^) :</p> <p> </p> <p>http://www.youtube.com/watch?v=5ZZ0VhHxanQ</p>
  • 0 Votes
    9 Posts
    3k Views
    vfrzV
    <p>Bonsoir, bonjour !</p> <p> </p> <p>Voici le partage de mon tutoriel-vidéo pour ajouter la sauvegarde des armes civiles et des équipements sur un serveur Altis Life en version 3.1.2</p> <p> </p> <p>http://www.youtube.com/watch?v=ewYqsoHFouA</p>