Welcome to Altis Life RPG

Register now to gain access to all of our features.
Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.


Note that you can now sign-in with your Steam account.


This message will be removed once you have signed in.

  • Announcements

    • Rozo

      Donations   09/18/2016

      Hello,
        We've added a donation block on the right side. All of those donation goes directly to the developer of Altis Life mod ( currently BoGuu ). None of that money is used to maintain the forum. In the future we might add a donation button to support the forum, but for now we want to encourage the developer because they went through a lot. To discuss this topic - Here
    • Shakir Darwish

      IS YOUR SERVER BROKEN SINCE 1.64 UPDATE?   09/22/2016

      If your server is broken since 1.64 go check this link thanks. https://github.com/AsYetUntitled/Framework/issues/104
    • Rozo

      Sad Day   01/04/2017

      Good evening community of Altis Life RPG, Today was a sad day. We learned the hard way that one of the helper was using his status and visibility on the forum to do things i wouldn't imagine.  We were warned about this user in the beginning, we talked about his behavior and he said that they were things of the past. We were fooled.
      Unfortunately, he fooled other community members by selling stolen content and impersonating his role as a developer in another community. Here's a remember of one of the rules on our forum, No selling scripts, snippets, or services.   So if anyone come across someone who's selling his services, scripts or whatever, Report them. Especially if it's coming from an Helper, Mod, Admin. No one in the staff should ask for money, we already mention this when we reopened the forum and that rule is here to stay.

      We can't be sorry enough for what happen here, for any harm it as caused among other communities, for money that shouldn't been spent and we truly hope this doesn't happen again.

      As for the user in question, he is now banned from our forum and discord and we wish to never cross his path again.
        If there's anything we can do hit us on Discord or send a message to an admin.
      Thanks, Rozo.

Search the Community: Showing results for tags 'building'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Altis Life RPG
    • Headquarters
    • Introductions
    • RULES
  • Altis Life RPG Community
    • General Discussion
    • Helper Recruitment
    • Altis Life Server Advertising
    • Discord (join us for discuss)
  • Tools and Administration
    • Altis Life RPG (official Framework)
    • Altis Life Wiki
    • Server Setup and Configuration
    • Database
    • Security
    • Maintenance
  • Altis Life Customization
    • Server & Scripting Help Desk
    • Releases & Download
    • Misc & Tools

Calendars

  • Community Calendar

Categories

  • Articles

Found 1 result

  1. [Tutorial] Placeable Objects as Police

    Translated By: Snipes Murphy Difficulty: Medium Credit To: Altis Dev I'll take that person Maximum who make its code to 3.1.4.8. Functional for 4.x. First, let's go Mpmissions \ Altis_life.Altis \ Function.h Below class Dialog_Controls { file = "dialog\function"; class setMapPosition {}; class displayHandler {}; class spawnConfirm {}; class spawnMenu {}; class spawnPointCfg {}; class spawnPointSelected {}; class progressBar {}; class impoundMenu {}; class unimpound {}; class sellGarage {}; class bankDeposit {}; class bankWithdraw {}; class bankTransfer {}; class garageLBChange {}; class safeInventory {}; class safeOpen {}; class safeTake {}; class safeFix {}; class vehicleGarage {}; class gangDeposit {}; class wireTransfer {}; class insureCar{}; }; Add this: class CopPlaceables { file = "core\cop\placeables"; class placeablesInit {}; class placeablesMenu {}; class placeablesRemoveAll {}; class placeablePlace {}; class placeableCancel {}; class placeablesPlaceComplete {}; }; Then go to core \ cop and create a new folder will be called "placeables" And in this case we will add 6 sqf files. Let's start with the "fn_placeablesInit.sqf" file, add this one are: (Here you can change the object name in quotes and the object itself) /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE… Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ life_barrier_active = false; life_barrier_activeObj = ObjNull; life_placeables = [ [ "Cone", "RoadCone_F"], [ "Cone White Light", "RoadCone_L_F"], [ "Road Sign", "SignAd_Sponsor_F"], [ "Fence", "Land_BarGate_F"], [ "Fence truck", "Land_Crash_barrier_F"], [ "Fence Orange plastic", "PlasticBarrier_03_orange_F"], [ "Fence yellow plastic", "PlasticBarrier_02_yellow_F"], [ "Single Lamp", "Land_PortableLight_single_F"], [ "Dual Lamp", "Land_PortableLight_double_F"], [ "From the UN flag", "Flag_UNO_F"] ]; life_bar_limit = 2500; life_bar_placey = []; Then continue to create our files, with this one "fn placeable Menu.sqf", adding that it will: /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE... Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ disableSerialization; createDialog "life_cop_placeables"; waitUntil { !isNull(findDisplay 20000) }; _display = findDisplay 20000; _placeables = _display displayCtrl 20001; lbClear _placeables; { _name = _x select 0; _className = _x select 1; _placeables lbAdd _name; _placeables lbSetData [(lbSize _placeables) - 1, _className]; } foreach (life_placeables); Create "fn placeable RemoveAll.sqf", add this: /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE... Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ { deleteVehicle _x; } forEach (life_bar_placey); Create "fn_placeablePlace.sqf", add this: /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE... Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ disableSerialization; if (count life_bar_placey >= life_bar_limit) exitWith { hint "You've reached the limit of objects you can place."; }; _display = findDisplay 20000; _placeables = _display displayCtrl 20001; _className = lbData[20001, lbCurSel (20001)]; closeDialog 0; life_barrier_active = true; _allowMoveDistance = 50; _object = _className createVehicle (position player); life_barrier_activeObj = _object; _attachPos = [0, 3, 0.5]; _object attachTo[player, _attachPos]; _object enableSimulationGlobal false; _originalPos = position _object; _playerOriginalPos = position player; waitUntil{ if (life_barrier_activeObj distance _originalPos > _allowMoveDistance || player distance _playerOriginalPos > _allowMoveDistance) then { [true] call life_fnc_placeableCancel; }; sleep 1; !life_barrier_active; }; Create "fn_placeableCancel.sqf", add this: /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE... Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ if (!life_barrier_active) exitWith {}; //bad check? deleteVehicle life_barrier_activeObj; life_barrier_active = false; life_barrier_activeObj = ObjNull; To finish create "fn placeable Complete.sqf Place", add this: /* Author: Maximum Description: Placeables for the cop\medic sides. Disclaimer: Don't be a asshole and pass this off as your own or become a KAI and sell it for profit, Im releasing this for FREE... Credits: Killerty69 for a second pare of eyes when mine got to sleepy P.S. - Don't be a faggot like i know some of you all will be. */ disableSerialization; if (!life_barrier_active) exitWith {}; if (life_barrier_activeObj == ObjNull) exitWith {}; _currentPos = getPosATL life_barrier_activeObj; detach life_barrier_activeObj; life_barrier_activeObj setPos[(getPos life_barrier_activeObj select 0), (getPos life_barrier_activeObj select 1), 0]; life_barrier_activeObj enableSimulationGlobal true; life_bar_placey pushBack life_barrier_activeObj; life_barrier_active = false; life_barrier_activeObj = ObjNull; Then go to dialog \ Master Handler.h, e Added: (after another) #include "placeables.hpp" Also in the file dialog, create the "placeables.hpp" File, Add it: class Life_Cop_Placeables { idd = 20000; name= "life_cop_placeables"; movingEnable = false; enableSimulation = true; onLoad = ""; 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.6; 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.6; h = 0.6 - (22 / 250); }; }; class controls { class Title : Life_RscTitle { colorBackground[] = {0, 0, 0, 0}; idc = -1; text = "Available placeables"; x = 0.1; y = 0.2; w = 0.6; h = (1 / 25); }; class PlaceablesList : Life_RscListBox { idc = 20001; text = ""; sizeEx = 0.035; x = 0.12; y = 0.26; w = 0.56; h = 0.370; }; 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.8 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class RemoveAll : life_RscButtonMenu { idc = -1; text = "Remove all"; onButtonClick = "[] call life_fnc_placeablesRemoveAll"; x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); y = 0.8 - (1 / 25); w = (6.25 / 40); h = (1 / 25); }; class Place : Life_RscButtonMenu { idc = -1; text = "Place"; 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_placeablePlace;"; x = 0.32; y = 0.69; w = (6.25 / 40); h = (1 / 25); }; }; }; Then still in the same folder, enter the file and add player_inv.hpp after that: 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); }; Add this: class ButtonPlaceables: Life_RscButtonMenu { idc = 20003; text = "Placeables"; onButtonClick = "[] spawn life_fnc_placeablesMenu; closeDialog 0;"; //x = 0.26 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); y = 0.801; w = (6.25 / 40); h = (1 / 25); }; Then go to Core \ pmenu \ fn_p_openMenu.sqf and add ctrlShow[20003,false]; For Civ and Independent box (for those that can) Like this : switch(playerSide) do { case west: { ctrlShow[2011,false]; }; case civilian: { ctrlShow[2012,false]; ctrlShow[20003,false]; //<--- ajouter ici }; }; It's nearly finished Go to your fn_initCop.sqf in Core And add (at the end) [] spawn life_fnc_placeablesInit; And finally go to Core \ Function \ KeyHandler.sqf Go right at the end and add: case 46 : { _currentPos = getPosATL life_barrier_activeObj; detach life_barrier_activeObj; life_barrier_activeObj setPos[(getPos life_barrier_activeObj select 0), (getPos life_barrier_activeObj select 1), 0]; life_barrier_activeObj enableSimulationGlobal true; life_bar_placey pushBack life_barrier_activeObj; life_barrier_active = false; life_barrier_activeObj = ObjNull; hint "Vous avez placé l'objet !"; }; ** For box 46 (the C key) If you want to change the letter, go here ** https: //community.bistudio.com/wiki/DIK_KeyCodes And choose a letter not yet defined by basic BOHEMIA, for example (the R key is to recharge = impossible to define it as one) Well, that's it for me! ** I hope it was understandable to you! Thanking you! **