Aller au contenu

Rechercher dans la communauté

Affichage des résultats pour les étiquettes 'difficile'.

  • Rechercher par étiquettes

    Saisir les étiquettes en les séparant par une virgule.
  • Rechercher par auteur

Type du contenu


Forums

  • Discussions communautaires
    • Annonces importantes
    • Suggestions
    • Postulation
    • Présentation des membres
    • Discussions générales
    • Multimédias
    • Jeux vidéos
    • Actualités
    • Aide / Support
    • Études
    • Archives
  • Informatique
    • Projets des membres
    • Autres / Divers / Découvertes
    • Crypto-monnaie(s)
    • Hardware / Electronique
    • Réseaux
    • Gestion de serveur
    • Système d'exploitation : Smartphone
    • Système d'exploitation : Ordinateur
  • Programmation
    • Projets des membres
    • Développement web
    • Développement de logiciels
    • Développement d'applications pour smartphones
    • Outils du développeur
    • Aide / Support
  • Emulation
    • Aion
    • Arma III
    • Dofus
    • Dragonica
    • Emulateurs consoles
    • S4 League
    • FlyFF
    • Grand Theft Auto
    • Minecraft
    • Tera
  • Partenariats
    • <b>WoW Emu - La communauté émulation WoW</b>
    • <b>ActuGaming</b>
    • <b>H-Wars</b>
    • <b>EasyChat - Solution gratuite de chat client et serveur (anciennement Melichat)</b>
    • <b>Le Monde des Lunes</b>
    • <b>DansTonCode</b>

Calendriers

  • Calendrier de la communauté

Rechercher les résultats dans…

Rechercher les résultats qui…


Date de création

  • Début

    Fin


Dernière mise à jour

  • Début

    Fin


Filtrer par nombre de…

Inscription

  • Début

    Fin


Groupe


Skype


Site web


AIM


MSN


ICQ


Yahoo


Jabber


Tox


Centres d'interêts


Localisation


Niveau d'étude

3 résultats trouvés

  1. 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); }; }; }; 7. 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; }; 13. 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
  2. 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 !
  3. Salut, Je vous conseille fortement de faire une sauvegarde du serveur avant de faire ce tutoriel. Désoler si cela alterne "citations" et "extrait de code" la ou sont écrit les scriptes mais je peux pas mettre que des citations j'ai était obliger de refaire le tutoriel du coup j'ai alternée. On commence: ------------------------------------------------------------------------------------------------------------------------------ core\actions\fn_gather.sqf Ligne 9 : Remplace _resourceZones = ["apple_1","apple_2","apple_3","apple_4","peaches_1","peaches_2","peaches_3","peaches_4","heroin_1","cocaine_1","weed_1"]; Par : _resourceZones = ["apple_1","apple_2","apple_3","apple_4","peaches_1","peaches_2","peaches_3","peaches_4","heroin_1","cocaine_1","weed_1","meth_1"]; Ligne 29 : case (_zone in ["weed_1"]): {_gather = "cannabis"; _val = 1;}; Ajoutez après : case (_zone in ["meth_1"]): {_gather = "methu"; _val = 1;}; core\actions\fn_processAction.sqf Ligne 26 : case "cement": {["rock","cement",350,(localize "STR_Process_Cement")];}; Ajoutez après : case "meth": {["methu","methp",5000,(localize "STR_Process_Meth")];}; core\config\fn_itemWeight.sqf Ligne 58 : case "storagebig": {10}; Ajoutez après : case "methu": {6}; case "methp": {4}; core\config\fn_licensePrice.sqf Ligne 37 : case "home": {75000}; Ajoutez après : case "meth": {250000}; core\config\fn_LicenseType.sqf Ligne 42 : case "home": {_var = "license_civ_home"}; Ajoutez après : case "meth": {_var = "license_civ_meth"}; Ligne 75 : case "license_civ_home": {_var = "home"}; Ajoutez après : case "license_civ_meth": {_var = "meth"}; core\config\fn_varHandle.sqf Ligne 67 : case "storagebig": {"life_inv_storagebig"}; Ajoutez après : case "methu": {"life_inv_methu"}; case "methp": {"life_inv_methp"}; Ligne 125 : case "life_inv_storagebig": {"storagebig"}; Ajoutez après : case "life_inv_methu": {"methu"}; case "life_inv_methp": {"methp"}; core\config\varToStr.sqf Ligne 63 : case "life_inv_storagebig": {(localize "STR_Item_StorageBL")}; Ajoutez après : case "life_inv_methu": {(localize "STR_Item_MethU")}; case "life_inv_methp": {(localize "STR_Item_MethP")}; Ligne 89 : case "license_civ_home": {(localize "STR_License_Home")}; Ajoutez après : case "license_civ_meth": {(localize "STR_License_Meth")}; core\config\fn_virt_shops.sqf Ligne 18 : Remplacez avec : core\configuration.sqf Ligne 159 : Ajoutez après : Ligne 191 : Ajoutez après : Ligne 200 : Remplacez par : Ligne 241 : Ajoutez après : Altis_Life.Altis\stringtable.xml Ligne 3430 : Ajoutez après : Ligne 3601 : Ajoutez après : Altis_Life.Altis\stringtable.xml Cherchez : Ajoutez en dessous ou à la fin : Toujours dans le fichier stringtable.xml, cherchez : Et dans <French> mettez ça : Si vous voulez modifier le prix à payer pour traiter la meth sans avoir acheter la licence de meth : core\actions\fn_processAction.sqf : Le "5000" est le prix, il suffit juste de le remplacer. Par exemple en mettant 25000, le joueur devra payer 25.000 pour traiter la meth qu'il a sur lui sans avoir la licence. Voilà pour la partie serveur maintenant la partie édition de la map : Editer votre map : Faites un double-clic quelque part, sélectionnez "civil" et faites bien "non jouable". Appelez le comme vous voulez et dans initialisation mettez : this allowDamage false; this enableSimulation false;this addAction["Traiter la méthamphétamine",life_fnc_processAction,"meth",0,false,false,"",' life_inv_methu > 0 && vehicle player == player && player distance _target < 2 && !life_is_processing ']; this addAction[format["%1 (%2$)",["license_civ_meth"] call life_fnc_varToStr,[(["meth"] call life_fnc_licensePrice)] call life_fnc_numberText],life_fnc_buyLicense,"meth",0,false,false,"",' !license_civ_meth && vehicle player == player && player distance _target < 2 && playerSide == civilian ']; Le pnj est fini faites "ok" Maintenant pour faire le champ : Faites F6, puis double-cliquez là où vous voulez faire le champ. A côté d'icone sélectionnez "Point" et mettez-le de la couleur que vous voulez, ensuite dans nom mettez ce que vous voulez. Par exemple "meth" et dans Texte c'est ce qui apparaîtra sur la map. Donc vous pouvez mettre "Champ de Meth". C'est pas fini, double-cliquez tout près du point que vous venez de faire. Sélectionnez "Ellipse" et mettez 20 dans axe "A" et "B" puis 0 dans angle. Sélectionnez "solide" et "blanc". Dans "nom" mettez bien "meth_1" sinon il se peut que ça ne fonctionne pas. Mettez rien dans "texte". N'oubliez pas de mettre une virgule ! Par exemple dans core\configuration.sqf à la ligne 159 mettez une virgule à la fin de "life_inv_storagebig," et non pas "life_inv_storagebig" Pour ceux qui on la bourse sur leur serveur et qui veulent modifier le prix et l'implanter dans la bourse voici le Mini tutoriel: Ouvrir: Core/ Market / fn_marketconfiguration Ajouter à partir de la ligne 92 ["methp", 6000, 4500, 8500, 4, 4, [ ["marijuana",1], ["turtle",1], ["heroinp",1], ["cocainep",1] ] ], Ensuite ajouter: pour les 4 autres stupéfiants: ["methp",1] comme ceci: ["marijuana", 4500, 2750, 6000, 4, 4, [ ["turtle",1], ["cocainep",1], ["heroinp",1], ["methp",1] ] ], Attention à bien rajouter la virgule sur celui du dessus quand vous rajouter le scripte en dessous ! Voilà désoler mais c'est un tutoriel assez long mais cela en vaux le coup ! Cordialement,
×
×
  • Créer...