Aller directement au contenu

Tutoriels

30 Sujets 243 Messages

Cette catégorie peut être suivie depuis le web social ouvert via le pseudo [email protected]

  • Admin Menu 3.1.4.8

    16
    0 Votes
    16 Messages
    9k Vues
    ArrowDarkA
    Bonjour , je tien a précisé que ce tuto ne viens pas de moi mais de Forum Bulldog : http://www.altisliferpg.com/topic/4375-modifyextended-admin-menu/   Commençons tout de suite :      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 : '0','1','2','3','4','5' 2 . Aller dans Function.h (qui se trouve a la racine de votre mission) et modifié la Class Admin 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 {}; }; 3 . Aller dans stringtable.xml (Qui se trouve à la racine de votre mission)  et modifié Admin Menu <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> 4 . Toujours dans le même fichier juste en dessous Modifié Notification admin <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> 5 . dialog\admin_menu.hpp 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); }; }; }; 6 . dialog\compensate.hpp 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); }; }; }; dialog\MasterHandler.h #include "compensate.hpp" 8 . core\admin\fn_adminMenu.sqf #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;}; 9 . core\admin\fn_adminSpectate.sqf #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"]; 10 . core\admin\fn_adminTeleport.sqf #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"; 11. core\admin\fn_adminTpHere.sqf #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]]; 12. core\admin\fn_adminCompensate.sqf #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; }; core\admin\fn_adminDebugCon.sqf #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; 14. core\admin\fn_adminGodMode.sqf #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; }; 15. core\admin\fn_adminFreeze.sqf #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; 16 . core\admin\fn_adminMarkers.sqf #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; }; 17. core\configuration.sqf life_god = false; //Add this life_frozen = false; //And this life_markers = false; //Finally this 18 . Nouveau fichier dans core\civilian est nommé le****fn_freezePlayer.sqf #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; }; Voila , aurevoir et au fait je suis de retour
  • Ajouter la bourse !

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

    4
    0 Votes
    4 Messages
    2k Vues
    hamzadamsH
    Mettre du nitro Adapter pour la version 3.1.4.8 (La dernière de itsyuka) Pour commencer on va créée l'item "nitro" : Vous aller dans le fichier fn_VarHandle.sqf pour y rajoutez  dans la case 0 dans le switch case 0: { switch (_mode) do { case 0: { switch (_var) do { case "nitro": {"life_inv_nitro"}; }; }; Maintenant vous aller juste en bas dans case 1 case 1: { switch (_var) do { case "life_inv_nitro": {"nitro"}; }; }; }; Voila maintenant l'items créer on va le configurer pour ça il faut aller dans le fichier Config_Master.hpp puis aller dans la class VirtuelItems //Virtual Items class VirtualItems { VITEMMACRO(nitro,"Nitro",nitro,5,1500,0,-1,false,-1,"") }; Voila vous rajouter ça puis vous pouvez configurer le poids le prix ... et pour terminer la config il faut aller dans le fichier fn_useItem.sqf Vous rajouter ça a la fin avant Default 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 ] } }; Puis vous allez dans le fichier de configuration des touches fn_KeyHandler.sqf vous rajouter ça ou vous voulez de façon logique bien sur ^^ //N Touche Nitro case 49: if([false,"nitro",1] call life_fnc_handleInv) then { [] spawn life_fnc_nitroUse; } } Pour finir vous créer un fichier fn_nitroUse.sqf dans \Altis-Life-master\extDB-Build\Altis_Life.Altis\core\items /*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]; }; }; Voila j’espère ça marchera pour tout le monde et que j'ai été le plus claire ^^ Faite moi des retour
  • Sauvegarder l'essence du véhicule dans la DB

    5
    0 Votes
    5 Messages
    2k Vues
    hamzadamsH
    Sauvegarder l'essence dans la DB Ce tutoriel fonctionne pour les version 3.1.x pour la version 4.0 je ferais un tuto quand j'aurai le temps Ajouter une table sur votre base de donnée MySql ALTER TABLE `vehicles` ADD `fuel` VARCHAR(16) NOT NULL DEFAULT '1' Ensuite aller dans le fichier \extDB-Build\life_server\Functions\Systems\fn_cleanup.sqf _query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,fuel _veh]; il faut juste aller dans la variable "_query" et ajouter fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate,fuel _veh à coter de "active ='0" Maintenant vous aller dans le fichier fn_vehicleStore.sqf Puis vous aller en bas de if(_impound) et la vous aurai une variable qui s'appelle _query et vous modifier cette ligne de code _query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate, fuel _vehicle]; 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 : _query = format["UPDATE vehicles SET active='0', fuel='%3' WHERE pid='%1' AND plate='%2'",_uid,_plate, fuel _vehicle]; Maintenant vous aller dans le fichier fn_spawnVehicle.sqf et vous faite la même procédure vous changer la variable _query par : _query = format["SELECT id, side, classname, type, pid, alive, active, plate, color, fuel FROM vehicles WHERE id='%1' AND pid='%2'",_vid,_pid]; Puis juste en bas de cette var vous rajouter : _fuel = parseNumber(_queryResult select 9); puis enfin pour terminer vous ajouter ce code en bas de "_vehicle setDir _dir;" _vehicle setFuel _fuel; Ce qui donne : 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; J’espère pas avoir fait d'erreur et sinon pour le version 4.0 je ferais le plutôt possible Et enfaîte je suis de retour sur melinyel [image: default_biggrin.png]
  • Activer Zeus sur Altis Life

    11
    0 Votes
    11 Messages
    5k Vues
    vfrzV
    Bonjour, Voici un tutoriel pour activer Zeus sur son serveur Altis Life Crédit : Archangel_za pour son tutoriel sur altisliferpg.com et EdgeKiller pour la traduction (en cours...). 1 - Dans votre fichier "core\init.sqf", vous devez ajouter une "case" pour le mode Zeus, donc en dessous de ceci : 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}; }; Ajoutez ceci : case sideLogic: { _handle = [] spawn life_fnc_initZeus; waitUntil {scriptDone _handle}; }; Avant la fin du switch. 2 - Créer un fichier dans le dossier core nommé "fn_initZeus.sqf" et mettez ceci à l'intérieur : /* 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"; }; 3 - Ouvrez le fichier "functions.h" et en dessous de : class Master_Directory { Ajoutez : class initZeus {}; 4 - Allez dans l'éditeur: 1 • Ajoutez un module (Double clique) 2 • Pour la catégorie mettez "Zeus" 3 • Pour le module mettez "GameMaster" Les paramètres doivent être comme sur l'image suivante : ![2nkkns9.jpg](<base_url>/applications/sslimageproxy/interface/image.php?url=http://i57.tinypic.com/2nkkns9.jpg) Désormais Zeus est activé sur votre serveur Altis Life ! Have fun ! PS : N'oubliez pas de vous connectez en tant qu'administrateur en tapant ceci dans le chat : #login <Admin Password>
  • Fenêtre pour le vendeur de licences

    9
    0 Votes
    9 Messages
    8k Vues
    vfrzV
    Bonjour, il s'agit d'un tutoriel assez simple, cependant il faut avoir un minimum de connaissances pour s'y retrouver ! Crédit : -RichHomieQuan pour le tutoriel sur altisliferpg.com -Moi pour la traduction C'est parti ! Ajoutez ceci dans le fichier functions.h, en dessous de "shops" : class licenses {}; Créez un fichier dans le dossier dialog, nommé LicensesDialog.hpp 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; };"; }; }; }; Créez un fichier nommé fn_licenses.sqf dans core/shops : 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; Il va falloir aussi changer l'initialisation des pnjs comme ceci (exemple) : this addAction["Licenses",life_fnc_licenses,["driver","boat","pilot","truck","home","gun"],0,true,true,"",' playerSide == civilian ']; Au lieu de : 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 ']; ... Voici un petit screenshot pour la fin : [image: 43af8e7fe6f0e28f936844c624531f97.png]
  • [TUTO] Braquage de Station service

    3
    0 Votes
    3 Messages
    2k Vues
    matthieuM
    Bonsoir à tous, comme je n'ai pas vu de tuto encore sur ca sur le forum, je me propose pour en faire un. Aller on commence. Je vous conseil de faire une sauvegarde avant de suivre ce tuto, on ne sait jamais, mieux vaut être prudent : Fichier qu'on va modifier : Mission.sqm, Functions.h Fichier qu'on va créer : fn_robShops.sqf dans MISSION\core\actions Tout d'abord allez dans la racine de votre mission MPMissions\racine ouvrez votre fichier Function.h, cherchez class Actions et rajoutez a la suite : class Actions { file = "core\actions"; class buyLicense {}; class healHospital {}; class pushVehicle {}; class repairTruck {}; class serviceChopper {}; ... class sellLicense {}; class robShops {}; //Rob Gas Station & Shops Script class takeOrgans {}; class robShops {}; //Voler station service Une fois cela modifié allez dans core\actions et créez un fichier fn_robShops.sqf et ajoutez ceci dedans : /* 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 ""; Pour finir, allez sur votre editeur de map, rajoutez un PNJ civil non jouable et mettez ceci dans son initialisation this addAction["Rob Cash Register",life_fnc_robShops]; [image: post-225-0-86332400-1431000726_thumb.jpg]
  • Tutoriel Interface Phone

    5
    0 Votes
    5 Messages
    3k Vues
    ArrowDarkA
    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 . Lien originale : http://altisdev.com/index.php?/topic/1426-interface-téléphone-iphone/ Maintenant : LE TUTO 1) Téléchargé le .rar :http://altisdev.com/index.php?app=core&module=attach&section=attach&attach_id=125 Mettez le telephone**.paa" dans votre dossier textures.** 3) Remplacer le fichier cell_phonne.hpp "dialog\cell_phone.hpp" . 4)  Remplacer le fichier common.hpp "dialog\common.hpp" Et voila , c'est finit , un petit screenshot pour voir a quoi cela ressemble ![494700107410screenshots2014112200005.jpg](<base_url>/applications/sslimageproxy/interface/image.php?url=http://img4.hostingpics.net/pics/494700107410screenshots2014112200005.jpg) Encore Merci a V0xid Aurevoir tout le monde
  • Sauvegarde automatique • Altis Life

    12
    0 Votes
    12 Messages
    7k Vues
    vfrzV
    Bonjour ! Voici un tutoriel pour ajouter la sauvegarde automatique (5-10-15 minutes) sur Altis Life. Fichier : "core\init.sqf" En dessous de : [] call life_fnc_setupActions;  Placez ceci  : [] spawn life_fnc_autoSave; Fichier : "core\functions\fn_autoSave.sqf" Créez le nouveau fichier fn_autoSave.sqf dans le dossier "core\functions", puis mettez ceci à l'intérieur : /* @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é." }; }; }; Vous pouvez enlever les lignes de "hint" si vous ne voulez pas avoir de message lorsque la sauvegarde auto se fait. Fichier : functions.h Dans la classe function, ajoutez ceci : class autoSave {}; Et voila désormais le jeu sera sauvegarder automatiquement toutes les x secondes ! (600 secondes = 10 minutes )
  • 101 Editor | Mapping

    Épinglé
    9
    0 Votes
    9 Messages
    4k Vues
    ArrowDarkA
    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 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é ! Lien de download : http://www.armaholic.com/page.php?id=20821 Voila ! Bye Bye
  • Créer une safezone

    12
    0 Votes
    12 Messages
    5k Vues
    S
    Source : http://altisdev.com/index.php?/topic/153-ajouter-des-safe-zones-script-anti-tir-dans-ces-zones/   1 -  Ouvrez votre mission.sqm avec l'éditeur Arma III   2 - Inserez un marqueur => Ellipse => Entrez un nom "safepyrgos" et Axe A et B = 400   2a - Faites de même avec d'autres endroits sur la map.   3 - Sauvegardez votre mission. 4 - Créez un fichier "safezone.sqf" et mettez le dans un dossier "scripts" DESCRIPTION: Tue joueur tirant dans une zone safe CONFIGURATION: Edit the #defines below. */ #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"];              }; }];     }; }; 5 - Dans "init.sqf", ajoutez : [] execVM "scripts\safezone.sqf";   Voilà, amusez vous bien
  • Système de craft par EdgeKiller

    10
    0 Votes
    10 Messages
    7k Vues
    vfrzV
    Bonsoir tout le monde ! Ce soir je vous partage un système de craft que j'ai créer complétement moi même, donc exclusif ! Petit aperçu : https://www.youtube.com/watch?v=BJegFHppdkc A faire : Traduire le script en allemand/italien/portugais Système de filtrage pour les vêtements/armes etc... • Fichier "Functions.h", mettez ceci dans la class "Action" : class craftAction {}; Dans la class "Config" : class craftCfg {}; Puis dans la class "Player_Menu" : class craft {}; class craft_update {}; • Fichier "dialog\MasterHandler.h", ajoutez : #include "craft.hpp" • Fichier "dialog\player_inv.hpp", remplacez : 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); }; Par : 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); }; Puis en dessous ajoutez ceci : 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); }; • Fichier "stringtable.xml", ajoutez : <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> Et ceci dans le package "Player_Menu" : <Key ID="STR_PM_Craft"> <Original>Craft</Original> <English>Craft</English> <German>Craft</German> <French>Craft</French> <Italian>Craft</Italian> <Portuguese>Craft</Portuguese> </Key> • Dans le dossier "dialog" créer un fichier nommé "craft.hpp" : /* 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); }; }; }; • Dans le dossier "core/actions", créer un fichier nommé "fn_craftAction.sqf" : /* 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 < _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)) < _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 < _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; • Dans le dossier "core/pmenu", créer un fichier nommé "fn_craft.sqf" : /* 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); • Dans le dossier "core/pmenu", créer un fichier nommé "fn_craft_update.sqf" : /* 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 < _invSize - 1},{_i = _i + 2}] do { _str = [_matsNeed select _i] call life_fnc_varToStr; _matsNum = _matsNeed select _i+1; _struct = _struct + format["%1x %2<br/>",_matsNum,_str]; }; }; } foreach (_config select 1); if(_struct == "") then { _struct = "No material needed"; }; _mats ctrlSetStructuredText parseText format[" <t size='0.8px'> %1 </t> ",_struct]; • Pour finir dans le dossier "core/config", créer un fichier "fn_craftCfg.sqf" : #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]] ] ]; }; }; }; }; 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 ! Crédits : EdgeKiller Si vous utilisez ce système, merci de mettre les crédits ENJOY !
  • [Tuto] Anti Alt F4

    9
    0 Votes
    9 Messages
    6k Vues
    S
    Bonjour à tous, Ce tutoriel n'est pas de moi, mais de Pink3vil, voici le lien : http://altisdev.com/index.php?/topic/271-anti-alt-f4-ctrl-alt-suppr-et-autres/ Fichier core\functions\fn_KeyHandler.sqf, ajoutez ceci : // 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; }; }; Voilà j'espère que ça aidera certaines personnes si vous avez un soucis n'hésitez pas
  • Fouiller un mort

    9
    0 Votes
    9 Messages
    3k Vues
    S
    Bonjour, Ce tuto est pas de moi mais de blah. Pour cela supprimez ceci du fichier core/functions/fn_inventoryOpened.sqf : //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; }; };
  • Désactiver SpyGlass

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

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

    8
    0 Votes
    8 Messages
    4k Vues
    ArrowDarkA
    Salut je viens vous faire un mini tuto pour comment installé un systême de remorquage sur votre serveur , ceci est extrêmement simple ! 1 . Téléchargé ce fichier et glissé le a la racine de votre Mission : https://www.mediafir...oj2nmftyd8woz7a Ouvrez l'init.sqf qui se trouve à la racine de votre mission et rajotué ça a la fin : _igiload = execVM "IgiLoad\IgiLoadInit.sqf"; Voila Plus qu'a sauvegardé et à redémarré le serveur !
  • Liste "Keyboard UI Number"

    Épinglé
    4
    0 Votes
    4 Messages
    2k Vues
    vfrzV
    Voici la liste des numéros correspondants aux touches, source : altisliferpg.com (midgetgrimm) 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
  • [Obsolète] Créer un serveur Altis Life (Arma III) version 3.1.2 en local

    12
    0 Votes
    12 Messages
    5k Vues
    vfrzV
    Bonjour, bonsoir ! Voici mon tutoriel vidéo pour créer un serveur Altis Life 3.1.2 en local (si sa intéresse quelqu'un ^^) : http://www.youtube.com/watch?v=5ZZ0VhHxanQ
  • [Obsolète] Carte Altis Life française 3.1.2

    17
    0 Votes
    17 Messages
    9k Vues
    MrkikaM
    Bonjour, J'ai traduis pour vos serveur la carte altis life. Je précise qu'elle est basée sur la dernière mise à jour et que les garages sont tout à fait fonctionnels. Je vous demanderais juste de respecter mon travail et de laisser mon message en haut de la carte. Voici le lien de téléchargement: https://www.mediafire.com/?3gr5ir704of1r61 Je ferais peut-être un tutoriel pour vous expliquer comment changer de map si cela vous intéresse. Version: 3.1.2 Bonne journée !