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.

Leaderboard


Popular Content

Showing most liked content since 05/29/2017 in Posts

  1. 19 likes
    Working Scripts Archive easy access to all available scripts _____________________________________________________________________________________________________________________________________________ UI and Informational Intro Music Intro Music 2 Intro Text Intro Cam Intro Video Outro Script StatusBar Removing Default Statusbar Spawn Menu Redone Updated HUD IPAD Y Menu IPAD Y Menu 2 AI Based Scripts Dynamic Airdrop Improvements & Basic Features Custom Spawn Loadouts for Civilians Seat Belts Patdown Player + Seize Objects Realistic Towing Ear Plugs Rubber Bullets Realistic CPR Kit Actions Menu Tag System Speed Bomb Zip Ties Police Backup Jaws of Life Realistic Tazer Hand Gestures Buyable Loadouts Backpack Custom Capacity Marijuana Effects Gag Action Fastrope Auto Save Adding Smoke Effect to Processing Placeable Objects for Police Invisible Backpacks for police/med Anti VDM Block Changing Names Cops can enter locked vehicles Warner's Barriers Configurable Jail Time Adding police radar GPS System Car Alarm Boat Rental Civilian Passports Police Gate Opening Hotkey Adding Smoke Trails to Cesna Suicide Vest Automatic Messages Animal Tracking (for Hunting) Wedding rings Systems and Complex Features Zipties Revised [Fully Working, With Gag and Blindfolds] Vehicle Insurance RYANTTS DYNAMIC MARKET SYSTEM OPFOR 4.4 Advanced Banking System, With Pins MrKraken's Gas Station Robbery Script Bounty Hunting Framework [Dialog, DB, Player Interaction] Altis Central Bank - Second Fed Purge [Server Event] Crafting System Slot Machines Bus Transportation Physical Cellphone Gang Capturable Areas Tutorials Basic Coding Tutorial Moving the Federal Reserve Task force Radio Black screen when not in channel ETC Separate Police/Civ Cash & Bank Account Gang Name Spawns Ruby Mine Custom Medic & Cop Skins Adding Licenses 4.4 Civilian Whitelisting Installing Task Force Radio (Addon/Mod) Mining with Shift+C Custom Paychecks Official Paid Scripts Maverick Applications Let me know if i missed anything
  2. 9 likes
    ============================================================================================================ Difficulty: Easy Tutorial By: Hyper4u ============================================================================================================ Open description.ext and under CfgSounds add save and then open fn_spawnConfirm go to Under add Then you put your sound in root -> sounds and name it Welcome and remember it has to be an .ogg AND DONT FORGET TO LEAVE A LIKE! THANKS
  3. 5 likes
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Difficulty: Easy Publish by: suffer4real Source AltisLifeRPG.com cache -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hello, many of you probably know this problem. Then let's start Open your " fn_initCop.sqf " and replaced this block: if(!(str(player) in ["cop_1","cop_2","cop_3","cop_4"])) then { if((FETCH_CONST(life_coplevel) == 1) && (FETCH_CONST(life_adminlevel) == 1)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; }; Replace With : if(!(str(player) in ["cop_99"])) then { if((FETCH_CONST(life_coplevel) < 1) && (FETCH_CONST(life_adminlevel) == 0)) then { ["NotWhitelisted",false,true] call BIS_fnc_endMission; sleep 35; }; }; Now open your Mission.sqm and change cop_1, cop_2, cop_3, cop_4 with your desired name Example: ( WhiteListed - Cop 1 )
  4. 4 likes
    I've noticed most newer people who dev on server decide to use the old "pack pbo-> start up dedicated server -> join and download pbo -> redo" method which usually takes several minutes This method only works on a local computer, i HIGHLY recommend setting one up if you don't have one. WARNING: if you plan to open your eden editor, launch a new normal arma 3 instead, cause it will add @life_server etc to your reqired addons if you don't. With this method (originally shown to me by Optix) , you can test things within 15 seconds to a minute depending on your machine and task. How to do this: Locate your main Arma 3 steam directory Find Arma3.exe [NOT Arma3server.exe] Right click Arma3.exe and create a shortcut of it Put this shortcut on your desktop Right click the shortcut and go to properties Enter the following into the "Target" section "C:\Program Files (x86)\Steam\steamapps\common\Arma 3\arma3.exe" "-mod=@extDB2;@life_server" -noSplash -skipIntro -showScriptErrors Change what you need in this, such as mods, locations, etc. I recommend keeping on showScriptErrors, very useful for finding out why your code does not work. Save this, now go into your main arma 3 directory Your mission should be in your 'MPMissions' folder, make sure it is not in a PBO format Make sure you only have one mission in here, move the others out until you're done, or rename them to 'whatever.Altis324' putting numbers at the end so the mission is not read Launch the shortcut and let your game load Go to multiplayer, click on 'Host Server' No need to change anything here unless you want a friend joining, if so change LAN to multiplayer and make sure you've port forwarded 2302-2303 Click the host server button Click the map you are running your server on Click the mission file you are testing Load into the mission the same way you normally would If you wish to re-test something, you can edit code in the non-pbo mission you have in MPMissions without messing up your server ingame Once you are done editing your code, simply abort from the mission like you would when you log out of any server It will bring you back to the create game menu, where to reload your new code you simply have to run your mission again Important tips if this does not work for you: This works best with a non-pbo mission, just leave the 'whatever.Altis' in your MPMissions and you can edit it at any time This only works on a local server you have set up
  5. 4 likes
    SEATBELTS handledamage: by Snipes mad dialog, eventHandlers, addaction, etc: by Repentz This script allows you to put on/take off your seatbelt when inside a vehicle, I have also fixed the problem of the seatbelt not disabling when exiting your vehicle Currently, the seatbelt reduces crash damage by 50%, I would put in an ejection function, but arma 3 desync leads to the script thinking you have crashed and ejecting you. Let's begin Go into core/Configuration.sqf, place this in the variables: life_seatbelt = false; Next, let's go into core/setupActions.sqf, place this at the very bottom to enable for all sides: life_actions pushBack (player addAction["<t color = '#D660D6'>Put on Seatbelt</t>",life_fnc_seatbelt,"",7,false,false,"",' !life_seatbelt && vehicle player != player ']); life_actions pushBack (player addAction["<t color = '#D660D6'>Remove Seatbelt</t>",life_fnc_seatbelt,"",7,false,false,"",' life_seatbelt && vehicle player != player ']); Go into core/functions/handleDamage.sqf, place this near the bottom before hudUpdate if ((vehicle _unit) isKindOf "Car" && (isNull _source || _source isEqualTo _unit)) then { _damage = if (life_seatbelt) then { _damage / 2 } else { _damage}; }; Create a file in core/functions called fn_seatBelt.sqf: /* //--By Repentz for altisLifeRPG */ #include "..\..\script_macros.hpp" /* fn_seatBelt.sqf */ //playSound "seatbelt"; //--Enable this to play a sound when you put your seatbelt on if(!life_seatbelt) then { life_seatbelt = true; } else { life_seatbelt = false; }; //[] call life_fnc_hudUpdate; //--Enable this if you are putting a hud option to display when your seatbelt is on. Go into functions.hpp in main directory, find functions section, add this: class seatbelt {}; Go into initPlayerLocal in your main directory, add this after "if (LIFE_SETTINGS(getNumber,"spyGlass_toggle") isEqualTo 1) then {[] execVM "SpyGlass\fn_initSpy.sqf";};" if (hasInterface) then { player addEventHandler ["GetOutMan", { life_seatbelt = false; //[] call life_fnc_hudUpdate; //--Enable if you are putting a hud option to display when your seatbelt is on }]; }; if (hasInterface) then { player addEventHandler ["GetInMan", { life_seatbelt = false; //[] call life_fnc_hudUpdate; //--Enable if you are putting a hud option to display when your seatbelt is on }]; }; Optional: If you want to have a icon display when you're inside your vehicle, and your seatbelt is on or off, put this in your hud_stats.hpp: #define IDC_LIFE_BAR_SeatBelt 4203 then LIFE_BAR_SeatBelt then class LIFE_BAR_SeatBelt: Life_RscPicture { idc = IDC_LIFE_BAR_SeatBelt; text = ""; x = 0.952292 * safezoneW + safezoneX; y = 0.664333 * safezoneH + safezoneY; w = 0.0331042 * safezoneW; h = 0.0589743 * safezoneH; }; This is still for optional icon display, go into hudUpdate: #define IDC_LIFE_BAR_SeatBelt 4203 then if(!isNil "life_seatbelt") then { if ( vehicle player != player ) then { if(life_seatbelt) then { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "rg_client\HUD\seatbeltOn.paa"; } else { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText "rg_client\HUD\seatbeltOff.paa"; }; } else { LIFEctrl(IDC_LIFE_BAR_SeatBelt) ctrlSetText ""; }; }; You will have to find your own icons, sounds, and position the icon wherever you wish if you want these features, also remember for the seatbelt sound to call it in description.ext as a new sound. Done.
  6. 4 likes
    Market Display This is a simple Dialog script for the Y-Menu which upon being opened, will pull a group of items from an array and displays a nice little description of the item along with the item's sell price (if any), buy price (if any) and weight. This was made specifically for virtual items and will not work with items such as weapons, clothing, or other items from Arma 3. Preview DISCLAIMER: These scripts were made on and tested on the most recent Altis Life Framework(v5.0.0) & 4.4r3. They may not work if you are attempting to use them on anything lower. The scripts also do not support Dynamic Markets of any kind. Tutorial 1. In your functions.hpp add the following to dialog\functions: class marketLBChange {}; class marketUpdate {}; class marketMenu {}; 2. Open dialog\functions and make a file called fn_marketLBChange: #include "..\..\script_macros.hpp" /* File: fn_marketLBChange.sqf Author: Bryan "Tonic" Boardwine Modified by Ilusionz */ private _itemControl = _this select 0; private _itemIndex = _this select 1; //Fetch some information. private _iName = _itemControl lbData _itemIndex; private _dName = M_CONFIG(getText,"VirtualItems",_iName,"displayName"); private _bPrice = M_CONFIG(getNumber,"VirtualItems",_iName,"buyPrice"); private _sPrice = M_CONFIG(getNumber,"VirtualItems",_iName,"sellPrice"); private _iWeight = M_CONFIG(getNumber,"VirtualItems",_iName,"weight"); private _iDescrip = M_CONFIG(getText,"VirtualItems",_iName,"description"); ctrlShow [60704,true]; ctrlShow [60705,true]; ctrlShow [60706,true]; ctrlShow [60707,true]; ctrlShow [60708,true]; ctrlShow [60709,true]; ctrlShow [60710,true]; ctrlShow [60711,true]; ctrlShow [60712,true]; ctrlSetText [60704, localize _dName]; ctrlSetText [60710,format ["%1",_iWeight]]; if (!(_bPrice isEqualTo -1)) then { ctrlSetText [60712,format ["$%1",[_bPrice] call life_fnc_numberText]]; } else { ctrlSetText [60712, "N/A"]; }; if (!(_sPrice isEqualTo -1)) then { ctrlSetText [60711,format ["$%1",[_sPrice] call life_fnc_numberText]]; } else { ctrlSetText [60711, "N/A"]; }; (CONTROL(60700,60709)) ctrlSetStructuredText parseText format["%1",_iDescrip]; 3. In dialog\functions make another file called fn_marketMenu.sqf: createDialog "marketdisplay"; [] call life_fnc_marketUpdate; 4. Again in dialog\functions create another file called fn_marketUpdate.sqf: #include "..\..\script_macros.hpp" /* File: fn_marketUpdate.sqf Author: Ilusionz Description: Update and fill the market menu. */ private ["_item_list","_shopItems","_name","_buyPrice","_sellPrice","_weight","_displayName"]; disableSerialization; //Setup control vars. _item_list = CONTROL(60700,67001); ctrlShow [60704,false]; ctrlShow [60705,false]; ctrlShow [60706,false]; ctrlShow [60707,false]; ctrlShow [60708,false]; ctrlShow [60709,false]; ctrlShow [60710,false]; ctrlShow [60711,false]; ctrlShow [60712,false]; //Purge list lbClear _item_list; if (!isClass(missionConfigFile >> "VirtualShops" >> "ymarket")) exitWith {closeDialog 0; hint localize "STR_NOTF_ConfigDoesNotExist";}; ctrlSetText[67003,localize (M_CONFIG(getText,"VirtualShops","ymarket","name"))]; _shopItems = M_CONFIG(getArray,"VirtualShops","ymarket","items"); { _displayName = M_CONFIG(getText,"VirtualItems",_x,"displayName"); _buyPrice = M_CONFIG(getNumber,"VirtualItems",_x,"buyPrice"); _sellPrice = M_CONFIG(getNumber,"VirtualItems",_x,"sellPrice"); _weight = M_CONFIG(getNumber,"VirtualItems",_x,"weight"); _item_list lbAdd format ["%1",(localize _displayName)]; _item_list lbSetData [(lbSize _item_list)-1,_x]; _icon = M_CONFIG(getText,"VirtualItems",_x,"icon"); if (!(_icon isEqualTo "")) then { _item_list lbSetPicture [(lbSize _item_list)-1,_icon]; }; } forEach _shopItems; 5. Open your dialog folder and create market_menu.hpp: class marketDisplay { idd = 60700; name= "marketDisplay"; movingEnable = 0; enableSimulation = 1; class controlsBackground { class Life_RscTitleBackground: Life_RscText { idc = -1; text = "Altis Item Database"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.27516 * safezoneH + safezoneY; w = 0.170156 * safezoneW; h = 0.022 * safezoneH; 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])"}; }; class MainBackground: Life_RscText { idc = -1; x = 0.298906 * safezoneW + safezoneX; y = 0.2976 * safezoneH + safezoneY; w = 0.402187 * safezoneW; h = 0.407 * safezoneH; colorBackground[] = {0,0,0,0.7}; }; class mText: Life_RscText { idc = -1; text = "Market Database"; //--- ToDo: Localize; x = 0.300969 * safezoneW + safezoneX; y = 0.302 * safezoneH + safezoneY; w = 0.195937 * safezoneW; h = 0.022 * safezoneH; 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}; }; class mText2: Life_RscText { idc = -1; text = "Item Information"; //--- ToDo: Localize; x = 0.502062 * safezoneW + safezoneX; y = 0.302 * safezoneH + safezoneY; w = 0.195937 * safezoneW; h = 0.022 * safezoneH; 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}; }; }; class controls { class itemList: Life_RscListBox { idc = 67001; onLBSelChanged = "_this call life_fnc_marketLBChange"; x = 0.304062 * safezoneW + safezoneX; y = 0.3328 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.363 * safezoneH; }; class Title: Life_RscTitle { idc = 67003; text = "Altis Item Database"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.2756 * safezoneH + safezoneY; w = 0.170156 * safezoneW; h = 0.022 * safezoneH; colorText[] = {0.95,0.95,0.95,1}; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * GUI_GRID_H; }; class ButtonClose: Life_RscButtonMenu { onButtonClick = "closeDialog 0;"; idc = 60702; text = "Close"; //--- ToDo: Localize; x = 0.636641 * safezoneW + safezoneX; y = 0.7046 * safezoneH + safezoneY; w = 0.0644531 * safezoneW; h = 0.022 * safezoneH; colorText[] = {1,1,1,1}; colorBackground[] = {0,0,0,0.8}; }; class ItemName: Life_RscText { idc = 60704; text = ""; x = 0.497937 * safezoneW + safezoneX; y = 0.335 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; sizeEx = 2.7 * 0.02; }; class BuyPrice: Life_RscText { idc = 60705; text = "Buy Price:"; //--- ToDo: Localize; x = 0.498969 * safezoneW + safezoneX; y = 0.5308 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; sizeEx = 2.7 * 0.02; }; class SellPrice: Life_RscText { idc = 60706; text = "Sell Price:"; //--- ToDo: Localize; x = 0.498969 * safezoneW + safezoneX; y = 0.5726 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; sizeEx = 2.7 * 0.02; }; class Weight: Life_RscText { idc = 60707; text = "Weight:"; //--- ToDo: Localize; x = 0.498969 * safezoneW + safezoneX; y = 0.6166 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; sizeEx = 2.7 * 0.02; }; class Description: Life_RscStructuredText { idc = 60708; text = "Description:"; //--- ToDo: Localize; x = 0.497937 * safezoneW + safezoneX; y = 0.379 * safezoneH + safezoneY; w = 0.06159 * safezoneW; h = 0.044 * safezoneH; }; class DescriptionText: Life_RscStructuredText { idc = 60709; text = ""; x = 0.497937 * safezoneW + safezoneX; y = 0.4164 * safezoneH + safezoneY; w = 0.195937 * safezoneW; h = 0.11 * safezoneH; }; class WeightNum: Life_RscText { idc = 60710; text = ""; x = 0.587635 * safezoneW + safezoneX; y = 0.6166 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; colorText[] = {"(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])"}; sizeEx = 2.7 * 0.02; }; class SellNum: Life_RscText { idc = 60711; text = ""; x = 0.587657 * safezoneW + safezoneX; y = 0.5726 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; colorText[] = {"(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])"}; sizeEx = 2.7 * 0.02; }; class BuyNum: Life_RscText { idc = 60712; text = ""; x = 0.587654 * safezoneW + safezoneX; y = 0.5308 * safezoneH + safezoneY; w = 0.190781 * safezoneW; h = 0.055 * safezoneH; colorText[] = {"(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])"}; sizeEx = 2.7 * 0.02; }; }; }; 6. In your dialog folder, open player_inv.hpp and add the following below ButtonSyncData: class marketButton: Life_RscButtonMenu { idc = 60714; onButtonClick = "[] call life_fnc_marketMenu"; text = "$STR_PM_yMarket"; //--- ToDo: Localize; x = 0.598484 * safezoneW + safezoneX; y = 0.66808 * safezoneH + safezoneY; w = 0.0644531 * safezoneW; h = 0.022 * safezoneH; colorText[] = {1,1,1,1}; colorBackground[] = {0,0,0,0.8}; }; 7. Open dialog\MasterHandler.hpp and add the following: #include "market_menu.hpp" 8. Open config_vItems.hpp and add the following class below class cop: If you are using Altis Life 5.0.0: //THIS IS NOT A SHOP, IT IS JUST THE LIST OF ITEMS THE MARKET PULLS - IT IS IN ALPHABETICAL ORDER class ymarket { name = "STR_Shops_yMarket"; conditions = ""; items[] = {"apple", "blastingcharge", "boltcutter", "cannabis", "catshark", "catshark_raw", "cement", "cocaine_processed", "cocaine_unprocessed", "coffee", "copper_refined", "copper_unrefined", "defibrillator", "defusekit", "diamond_cut", "diamond_uncut", "donuts", "fuelEmpty", "fuelFull", "glass", "goat", "goat_raw", "goldbar", "hen", "hen_raw", "heroin_processed", "heroin_unprocessed", "iron_refined", "iron_unrefined", "lockpick", "mackerel", "mackerel_raw", "marijuana", "mullet", "mullet_raw", "mushrooms", "oil_processed", "oil_unprocessed", "ornate", "ornate_raw", "peach", "pickaxe", "rabbit", "rabbit_raw", "redgull", "rock", "rooster", "rooster_raw", "salema", "salema_raw", "sand", "salt_refined", "salt_unrefined", "sheep", "sheep_raw", "spikeStrip", "storagebig", "storagesmall", "toolkit", "tbacon", "tuna", "tuna_raw", "turtle_soup", "turtle_raw", "waterBottle"}; }; If you are using Altis Life 4.x: class ymarket { name = "STR_Shops_yMarket"; side = ""; icense = ""; level[] = { "", "", -1, "" }; items[] = {"apple", "blastingcharge", "boltcutter", "cannabis", "catshark", "catshark_raw", "cement", "cocaine_processed", "cocaine_unprocessed", "coffee", "copper_refined", "copper_unrefined", "defibrillator", "defusekit", "diamond_cut", "diamond_uncut", "donuts", "fuelEmpty", "fuelFull", "glass", "goat", "goat_raw", "goldbar", "hen", "hen_raw", "heroin_processed", "heroin_unprocessed", "iron_refined", "iron_unrefined", "lockpick", "mackerel", "mackerel_raw", "marijuana", "mullet", "mullet_raw", "mushrooms", "oil_processed", "oil_unprocessed", "ornate", "ornate_raw", "peach", "pickaxe", "rabbit", "rabbit_raw", "redgull", "rock", "rooster", "rooster_raw", "salema", "salema_raw", "sand", "salt_refined", "salt_unrefined", "sheep", "sheep_raw", "spikeStrip", "storagebig", "storagesmall", "toolkit", "tbacon", "tuna", "tuna_raw", "turtle_soup", "turtle_raw", "waterBottle"}; }; 9. These scripts introduce a new setting needed on every virtual item you would like on your market display. Which is a small description of the item. If you want to, you can remove it in fn_marketLBChange - but I highly recommend keeping it as filler for the menu (plus a little bonus). Here are a few examples of a few I've used this (don't use these as their weights and prices may be different to yours): class marijuana { variable = "marijuana"; displayName = "STR_Item_Marijuana"; weight = 4; buyPrice = 7000; sellPrice = 5500; illegal = true; edible = -1; icon = "icons\ico_marijuana.paa"; description = "Classic OG kush. Snoop would be proud. Sold at any drug dealer."; }; class redgull { variable = "redgull"; displayName = "STR_Item_RedGull"; weight = 1; buyPrice = 1500; sellPrice = 200; illegal = false; edible = 100; icon = "icons\ico_redgull.paa"; description = "Enery drink that certainly doesn't give you wings. Very high in sugar."; }; class salt_unrefined { variable = "saltUnrefined"; displayName = "STR_Item_Salt"; weight = 5; buyPrice = -1; sellPrice = -1; illegal = false; edible = -1; icon = "icons\ico_saltUnprocessed.paa"; description = "Un-refined Salt. Processed at the Salt Processor. Also gathered from the Tears of the Arma Community."; }; 10. Finally, open your Stringtable.xml and add the following: <Key ID="STR_PM_yMarket"> <Original>Market</Original> </Key> <Key ID="STR_Shops_yMarket"> <Original>Altis Market</Original> </Key> And that's it! All done. SIDE NOTE: Make sure any new items you add to the virtual item config are also added to the market array, otherwise they won't show up!
  7. 4 likes
    Slot Machines By Papabear This script will allow your players to gamble away their money, everyone knows how slots work so.. I have also taken the time to stop duping/exploiting with this script with updatePartial calls, which everyone should look into. This script is based around a 1 million dollar start, the way it is, most people will lose money, if you wish to switch prices do so in the fn_slotSpin.sqf Let's begin. Download these icons, place them wherever you choose, but make sure the fn_slotSpin calls to the right location of them: Link 1: https://drive.google.com/open?id=0B21RLPd9cvL-WWsyeUdfWUsxUTg Link 2: http://www.filedropper.com/slotmachine Go into functions.hpp in main directory, place this under the civilian array: class slotSpin {}; class slotmachine {}; Go into core/civilian, add these new sqf files, first is called fn_slotmachine.sqf: /* Creates the Slot Machine GUI */ createDialog "SlotMachineGUI"; disableSerialization; Next, add a file called fn_slotSpin.sqf: /* File: fn_slotSpin.sqf Author: Jacob "PapaBear" Tyler Description: Takes bet, spins slots, determines if win, pays */ private["_slot","_slot1","_slot2","_slot3","_winnings","_slotcash","_betamt","_display"]; _betamt = [_this,0,1,[0]] call BIS_fnc_param; if(life_cash < _betamt) exitWith {hint format["You do not have enough money to play.",_betamt];}; life_cash = life_cash - _betamt; disableSerialization; _display = findDisplay 5780; _slotPic1 = _display displayCtrl 5771; _slotPic2 = _display displayCtrl 5772; _slotPic3 = _display displayCtrl 5773; _winningsText = _display displayCtrl 5775; _bet1 = _display displayCtrl 5778; _bet2 = _display displayCtrl 5779; _bet3 = _display displayCtrl 5781; _bet4 = _display displayCtrl 5782; _bet1 ctrlEnable false; _bet2 ctrlEnable false; _bet3 ctrlEnable false; _bet4 ctrlEnable false; _number = ceil(random 7); _pplayer = _this select 0; if (_number isEqualTo 0) then {_slot1 = 0; _slotPic1 ctrlSetText "textures\SlotMachine\slot_zero.paa";}; if (_number isEqualTo 1) then {_slot1 = 100; _slotPic1 ctrlSetText "textures\SlotMachine\slot_one.paa";}; if (_number isEqualTo 2) then {_slot1 = 200; _slotPic1 ctrlSetText "textures\SlotMachine\slot_two.paa";}; if (_number isEqualTo 3) then {_slot1 = 300; _slotPic1 ctrlSetText "textures\SlotMachine\slot_three.paa";}; if (_number isEqualTo 4) then {_slot1 = 400; _slotPic1 ctrlSetText "textures\SlotMachine\slot_four.paa";}; if (_number isEqualTo 5) then {_slot1 = 500; _slotPic1 ctrlSetText "textures\SlotMachine\slot_five.paa";}; if (_number isEqualTo 6) then {_slot1 = 600; _slotPic1 ctrlSetText "textures\SlotMachine\slot_six.paa";}; if (_number isEqualTo 7) then {_slot1 = 700; _slotPic1 ctrlSetText "textures\SlotMachine\slot_seven.paa";}; life_action_inUse = true; sleep 0.5; _number = ceil(random 7); _pplayer = _this select 0; if (_number isEqualTo 0) then {_slot2 = 0; _slotPic2 ctrlSetText "textures\SlotMachine\slot_zero.paa";}; if (_number isEqualTo 1) then {_slot2 = 10; _slotPic2 ctrlSetText "textures\SlotMachine\slot_one.paa";}; if (_number isEqualTo 2) then {_slot2 = 20; _slotPic2 ctrlSetText "textures\SlotMachine\slot_two.paa";}; if (_number isEqualTo 3) then {_slot2 = 30; _slotPic2 ctrlSetText "textures\SlotMachine\slot_three.paa";}; if (_number isEqualTo 4) then {_slot2 = 40; _slotPic2 ctrlSetText "textures\SlotMachine\slot_four.paa";}; if (_number isEqualTo 5) then {_slot2 = 50; _slotPic2 ctrlSetText "textures\SlotMachine\slot_five.paa";}; if (_number isEqualTo 6) then {_slot2 = 60; _slotPic2 ctrlSetText "textures\SlotMachine\slot_six.paa";}; if (_number isEqualTo 7) then {_slot2 = 70; _slotPic2 ctrlSetText "textures\SlotMachine\slot_seven.paa";}; sleep 0.5; _number = ceil(random 7); _pplayer = _this select 0; if (_number isEqualTo 0) then {_slot3 = 0; _slotPic3 ctrlSetText "textures\SlotMachine\slot_zero.paa";}; if (_number isEqualTo 1) then {_slot3 = 1; _slotPic3 ctrlSetText "textures\SlotMachine\slot_one.paa"; }; if (_number isEqualTo 2) then {_slot3 = 2; _slotPic3 ctrlSetText "textures\SlotMachine\slot_two.paa"; }; if (_number isEqualTo 3) then {_slot3 = 3; _slotPic3 ctrlSetText "textures\SlotMachine\slot_three.paa"; }; if (_number isEqualTo 4) then {_slot3 = 4; _slotPic3 ctrlSetText "textures\SlotMachine\slot_four.paa"; ;}; if (_number isEqualTo 5) then {_slot3 = 5; _slotPic3 ctrlSetText "textures\SlotMachine\slot_five.paa"; }; if (_number isEqualTo 6) then {_slot3 = 6; _slotPic3 ctrlSetText "textures\SlotMachine\slot_six.paa"; }; if (_number isEqualTo 7) then {_slot3 = 7; _slotPic3 ctrlSetText "textures\SlotMachine\slot_seven.paa"; }; sleep 0.5; _slot = _slot1 + _slot2 + _slot3; //cases for wins switch (_slot) do { case 111:{_winnings = 4000;}; case 110:{_winnings = 800;}; case 123:{_winnings = 900;}; case 211:{_winnings = 80;}; case 123:{_winnings = 800;}; case 234:{_winnings = 800;}; case 345:{_winnings = 9000;}; case 456:{_winnings = 1100;}; case 567:{_winnings = 1200;}; case 311:{_winnings = 800;}; case 411:{_winnings = 800;}; case 511:{_winnings = 800;}; case 611:{_winnings = 800;}; case 110:{_winnings = 800;}; case 112:{_winnings = 800;}; case 113:{_winnings = 800;}; case 114:{_winnings = 800;}; case 115:{_winnings = 800;}; case 116:{_winnings = 800;}; case 121:{_winnings = 600;}; case 131:{_winnings = 600;}; case 141:{_winnings = 600;}; case 151:{_winnings = 600;}; case 171:{_winnings = 600;}; case 121:{_winnings = 600;}; case 222:{_winnings = 3000;}; case 333:{_winnings = 2000;}; case 444:{_winnings = 2000;}; case 555:{_winnings = 1500;}; case 666:{_winnings = 25000;}; case 777:{_winnings = 45000;}; default {_winnings = 0;} }; //multiple winnings by bet amount _slotcash = _winnings * ( _betamt / 1000 ); life_cash = life_cash + _slotcash; _winningsText ctrlSetStructuredText parseText format["<t size='2.6px' color='#0099ff'>%1$</t>",_slotcash]; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; life_action_inUse = false; [0] call SOCK_fnc_updatePartial; Next, go into your dialog folder, add this and call it slot_machine.hpp: /* File: slot_machine.hpp Author: Jacob "PapaBear" Tyler Description: Takes bet, spins slots, determines if win, pays */ class SlotMachineGUI { idd = 5780; movingEnabled = false; enableSimulation = true; class controlsBackground { class RscFrame_1800: life_RscText { idc = -1; x = 0.29375 * safezoneW + safezoneX; y = 0.225 * safezoneH + safezoneY; w = 0.4125 * safezoneW; h = 0.55 * safezoneH; colorBackground[] = {0,0,0,0.7}; }; class RscText_1000: life_RscText { idc = -1; text = "Winnings:"; //--- ToDo: Localize; x = 0.355625 * safezoneW + safezoneX; y = 0.709 * safezoneH + safezoneY; w = 0.2475 * safezoneW; h = 0.055 * safezoneH; sizeEx = 3 * 0.03; }; class RscText_1003: life_RscText { idc = -1; text = "Betting"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.0567187 * safezoneW; h = 0.033 * safezoneH; sizeEx = 2 * 0.03; }; class RscText_1002: life_RscText { idc = -1; text = "Slot Machine"; //--- ToDo: Localize; x = 0.298906 * safezoneW + safezoneX; y = 0.225 * safezoneH + safezoneY; w = 0.309375 * safezoneW; h = 0.055 * safezoneH; colorText[] = {0,0.49,0.92,1}; sizeEx = 3 * 0.03; }; }; class controls { class SLOT_1: life_RscPicture { idc = 5771; text = "textures\SlotMachine\slot_empty.paa"; x = 0.2955 * safezoneW + safezoneX; y = 0.313 * safezoneH + safezoneY; w = 0.122 * safezoneW; h = 0.198 * safezoneH; }; class SLOT_2: life_RscPicture { idc = 5772; text = "textures\SlotMachine\slot_empty.paa"; x = 0.4195 * safezoneW + safezoneX; y = 0.313 * safezoneH + safezoneY; w = 0.122 * safezoneW; h = 0.198 * safezoneH; }; class SLOT_3: life_RscPicture { idc = 5773; text = "textures\SlotMachine\slot_empty.paa"; x = 0.543 * safezoneW + safezoneX; y = 0.313 * safezoneH + safezoneY; w = 0.122 * safezoneW; h = 0.198 * safezoneH; }; class Winnings: Life_RscStructuredText { idc = 5775; test = ""; x = 0.469062 * safezoneW + safezoneX; y = 0.709 * safezoneH + safezoneY; w = 0.2 * safezoneW; h = 0.055 * safezoneH; }; class EXIT_BTN: life_RscButtonMenu { idc = -1; text = "$STR_Global_Close"; onButtonClick = "closeDialog 0;"; x = 0.649531 * safezoneW + safezoneX; y = 0.225 * safezoneH + safezoneY; w = 0.0567187 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {0,0,0,0}; }; class RscText_1005: Life_RscText { idc = -1; text = "5.000$"; //--- ToDo: Localize; x = 0.371094 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorText[] = {0,0.49,0.92,1}; sizeEx = 2 * 0.03; }; class RscText_1006: Life_RscText { idc = -1; text = "10.000$"; //--- ToDo: Localize; x = 0.448438 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorText[] = {0,0.49,0.92,1}; sizeEx = 2 * 0.03; }; class RscText_1007: Life_RscText { idc = -1; text = "25.000$"; //--- ToDo: Localize; x = 0.536094 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorText[] = {0,0.49,0.92,1}; sizeEx = 2 * 0.03; }; class RscText_1008: Life_RscText { idc = -1; text = "50.000$"; //--- ToDo: Localize; x = 0.62375 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorText[] = {0,0.49,0.92,1}; sizeEx = 2 * 0.03; }; class BET_5K: life_RscButtonMenu { idc = 5778; tooltip = "5000$"; //--- ToDo: Localize; colorBackground[] = {0,0,0,0}; onButtonClick = "[5000] spawn life_fnc_slotSpin;"; x = 0.371094 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.0515625 * safezoneW; h = 0.033 * safezoneH; colorBackgroundFocused[] = {0,0,0,0}; colorBackground2[] = {0,0,0,0}; color[] = {1,1,1,1}; colorFocused[] = {0,0,0,0}; color2[] = {0,0,0,0}; colorText[] = {1,1,1,1}; }; class BET_50K: life_RscButtonMenu { idc = 5779; tooltip = "50000$"; //--- ToDo: Localize; colorBackground[] = {0,0,0,0}; onButtonClick = "[50000] spawn life_fnc_slotSpin;"; x = 0.62375 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorBackgroundFocused[] = {0,0,0,0}; colorBackground2[] = {0,0,0,0}; color[] = {1,1,1,1}; colorFocused[] = {0,0,0,0}; color2[] = {0,0,0,0}; colorText[] = {1,1,1,1}; }; class BET_25K: life_RscButtonMenu { idc = 5781; tooltip = "25000$"; //--- ToDo: Localize; colorBackground[] = {0,0,0,0}; onButtonClick = "[25000] spawn life_fnc_slotSpin;"; x = 0.536094 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorBackgroundFocused[] = {0,0,0,0}; colorBackground2[] = {0,0,0,0}; color[] = {1,1,1,1}; colorFocused[] = {0,0,0,0}; color2[] = {0,0,0,0}; colorText[] = {1,1,1,1}; }; class BET_10K: life_RscButtonMenu { idc = 5782; tooltip = "10000$"; //--- ToDo: Localize; colorBackground[] = {0,0,0,0}; onButtonClick = "[10000] spawn life_fnc_slotSpin;"; x = 0.448438 * safezoneW + safezoneX; y = 0.577 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.033 * safezoneH; colorBackgroundFocused[] = {0,0,0,0}; colorBackground2[] = {0,0,0,0}; color[] = {1,1,1,1}; colorFocused[] = {0,0,0,0}; color2[] = {0,0,0,0}; colorText[] = {1,1,1,1}; }; }; }; Now, let's define it in masterhandler.h inside the dialogs folder: #include "slot_machine.hpp" Now, go into eden editor, or however you wish to add this, it will call for the slot machine (let me know if it doesn't work, if not try removing a " on either side of Spin Slots Add this to an NPC, or preferably a infostand of your choice (off topic, but I also recommend switching the majority of your NPC's to infostands or some objects) this addAction ["Spin Slots", life_fnc_slotmachine]; Should be working, let me know if it's not Done.
  8. 3 likes
    Hello, Here is a tutorial to add MrKraken's gas station robbery script. Difficulty: Copy & paste Author: MrKraken Source : Altisliferpg.com (cache recovery) _____________________________________________________________________________________________________________________________________ 1. Navigate to the core folder and then the functions folder, create a file called fn_robstore.sqf and paste the following: /* file: fn_robShops.sqf Author: MrKraken Description: Executes the rob shob action! */ 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 "You can not rob this Gas Station!" }; if(_robber distance _shop > 5) exitWith { hint "You need to be within 5m of the cashier to rob him!" }; if !(_kassa) then { _kassa = 1000; }; if (_rip) exitWith { hint "Robbery already in progress!" }; if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hint "HaHa, you do not threaten me! Get out of here you hobo!" }; if (_kassa == 0) exitWith { hint "There is no cash in the register!" }; _rip = true; _kassa = 120000 + round(random 60000); _shop removeAction _action; _shop switchMove "AmovPercMstpSsurWnonDnon"; _chance = random(100); if(_chance >= 50) then {[1,format["ALARM! - Gas Station: %1 is being robbed!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; _cops = (west countSide playableUnits); if(_cops < 1) exitWith{[_vault,-1] remoteExec ["disableSerialization;",2]; hint "There isnt enough Police to rob Gas Station!";}; disableSerialization; 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Robbery in Progress, stay close (10m) (1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.0001; if(_rip) then { while{true} do { sleep 3; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Robbery in Progress, stay close (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! robbery !ATTENTION!"; "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 "You need to stay within 10m to Rob registry! - Now the registry is locked."; 5 cutText ["","PLAIN"]; _rip = false; }; 5 cutText ["","PLAIN"]; titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"]; deleteMarker "Marker200"; // by ehno delete maker life_cash = life_cash + _kassa; _rip = false; life_use_atm = false; sleep (30 + random(180)); life_use_atm = true; if!(alive _robber) exitWith {}; [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2]; }; sleep 300; _action = _shop addAction["Rob the Gas Station",life_fnc_robstore]; _shop switchMove ""; 2. Open your mission.sqm in the editor and go to a gas station you wish to rob and add then following to the init line of the NPC: this addAction["Rob the Gas Station",life_fnc_robstore]; 3. Go back to your root directory and open functions.hpp, once opened, find class Functions and at the end of the block add: class robstore {}; 4. ReCompile your mission and done
  9. 3 likes
    Author: Leon "DerL30N" Beeser" features: Individually Adjustable, relaxing in a Master.hpp, in the following areas: Any adjustment of the automatic save interval, the minimum is two minutes. (But I do not recommend less than 10 or 15 minutes to go) Locking the manual save, after every Autosave Duration of locking the manual storage, ie the time that the player after a "AutoSave" can not save manually. Only possible if the function of locking the manual save is enabled. Disabling and enabling a short; Or informative "Auto store information" in the system chat. (System Chat = Where you always see the BattleEye news, or see if a player enters the server or leaves) Intelligent saving: If a player manually his datastores / syncing, so waiting the script is completed by this operation AND also waiting for 5 minutes until it returns to work. This feature is designed to protect traffic. The 5 minutes arising from the time that must wait the skewer, until he, manually save, the next time, save for a manual. Important information : Developed in version 4.4r3 (Therefore, I recommend to test it once on lower versions. This does not remove the circumstances, there is no Life files are modified, except an entry in the init.sqf and descriptin.ext) An estimated compatible to version 4.0 (Please order tests and especially feedback) Please In attachment there are screenshots and the script followed, the installation HERE IN THE FORUM under installation. installation: 1. Add the following code below #include "config\Config_Master.hpp" inside description.ext #include "derleon\Scripts_Master.hpp" In Functions.hpp add: class autosave { file = "derleon\autosave"; class autoSaveInv {}; }; Inside Altis_Life.Altis \ core \ init.sqf Add the following code at the end: [] spawn life_fnc_autoSaveInv; Copy the downloaded folder named derleon from AutoSave_Scrip.zip And put it inside of Altis_Life.Altis
  10. 3 likes
    NEW LIFE RULE TIMER Credits to Ciaran for original creation of the script This script will display a timer when a player dies that will carry on to their next life, it will last a defined amount of time and will disappear if you are revived. https://gyazo.com/6a126c8ef164998b826a582a68f85367 INSTRUCTIONS Create a .Sqf file called fn_newLifeRule Place the file into your core\medical folder Place this code into the newly created file: /* New Life Rule Timer Released to AltisLifeRPG.com Credits to Ciaran for original creation of the script */ private["_uiDisp","_time","_timer"]; if(playerSide isEqualTo west) exitWith {}; if(playerSide isEqualTo independent) exitWith {}; disableSerialization; 7 cutRsc ["life_nlrtimer","PLAIN"]; _uiDisp = uiNamespace getVariable "life_nlrtimer"; _timer = _uiDisp displayCtrl 38301; _time = time + (10 * 60); life_nlrtimer_running = true; while {true} do { if(isNull _uiDisp) then { 7 cutRsc ["life_nlrtimer","PLAIN"]; _uiDisp = uiNamespace getVariable "life_nlrtimer"; _timer = _uiDisp displayCtrl 38301; }; if(round(_time - time) < 1) exitWith {}; if(life_nlrtimer_stop) exitWith {life_nlrtimer_stop = false;}; _timer ctrlSetText format["NLR: %1",[(_time - time),"MM:SS"] call BIS_fnc_secondsToString]; sleep 0.1; }; life_nlrtimer_running = false; 7 cutText["","PLAIN"]; Go into your functions.hpp in main directory Find class Medical_System { Place this as one of the classes below: class newLifeRule {}; Save and exit Functions.hpp Go into core, open up configuration.sqf Add these two under backend variables where all the other checks are life_nlrtimer_running = false; life_nlrtimer_stop = false; Go into core\medical\fn_revived.sqf and add this to the bottom: life_nlrtimer_stop = true; Save the file and close it Go into core\medical\fn_onPlayerKilled.sqf Find [] spawn life_fnc_deathScreen; Place this code right below it: //Credits to Ciaran for original creation of the script if(life_nlrtimer_running) then { life_nlrtimer_stop = true; waitUntil {!life_nlrtimer_running}; }; [] spawn life_fnc_newLifeRule; Save and exit this file Go into your dialog folder, open progress.hpp At the very bottom, place this code: //Credits to Ciaran for original creation of the script class life_nlrtimer { name = "life_nlrtimer"; idd = 38300; fadeIn = 1; duration = 99999999999; fadeout = 1; movingEnable = 0; onLoad = "uiNamespace setVariable['life_nlrtimer',_this select 0]"; objects[] = {}; class controlsBackground { class TimerIcon : life_RscPicture { idc = -1; text = "\a3\ui_f\data\IGUI\RscTitles\MPProgress\timer_ca.paa"; x = 0.00499997 * safezoneW + safezoneX; y = 0.291 * safezoneH + safezoneY; w = 0.04; h = 0.045; }; class TimerText : life_RscText { colorBackground[] = {0,0,0,0}; idc = 38301; text = ""; x = 0.0204688 * safezoneW + safezoneX; y = 0.2778 * safezoneH + safezoneY; w = 0.09125 * safezoneW; h = 0.055 * safezoneH; }; }; }; Save and exit this file, setup is complete. Let me know if there are any issues.
  11. 3 likes
    Please don't use that kind of language and if you are going to get angry at someone for trying to help then shouldn't you be saying how to fix it! If you have nothing nice to say don't say it at all!
  12. 3 likes
    Here is my code, This is a working fix for the newer version of AL: /* file: fn_robShops.sqf Author: MrKraken Description: Executes the rob shob action! */ 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 _action = [_this,2] call BIS_fnc_param;//Action name _rip = false; if(side _robber != civilian) exitWith { hint "You can not rob this Gas Station!" }; if(_robber distance _shop > 5) exitWith { hint "You need to be within 5m of the cashier to rob him!" }; if (vehicle player != _robber) exitWith { hint "Get out of your vehicle!" }; if !(alive _robber) exitWith {}; if (currentWeapon _robber == "") exitWith { hint "HaHa, you do not threaten me! Get out of here you hobo!" }; if (_rip) exitWith { hint "Robbery already in progress!" }; _rip = true; _kassa = 1200 + round(random 600); _shop removeAction _action; _shop switchMove "AmovPercMstpSsurWnonDnon"; _chance = random(100); if(_chance >= 10) then {[1,format["ALARM! - Gas Station: %1 is being robbed!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; _cops = (west countSide playableUnits); if(_cops < 1) exitWith{hint "There isnt enough Police to rob Gas Station!";}; disableSerialization; 5 cutRsc ["life_progress","PLAIN"]; _ui = uiNameSpace getVariable "life_progress"; _progress = _ui displayCtrl 38201; _pgText = _ui displayCtrl 38202; _pgText ctrlSetText format["Robbery in Progress, stay close (10m) (1%1)...","%"]; _progress progressSetPosition 0.01; _cP = 0.0001; if(_rip) then { while{true} do { sleep 1; _cP = _cP + 0.01; _progress progressSetPosition _cP; _pgText ctrlSetText format["Robbery in Progress, stay close (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! robbery !ATTENTION!"; "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 "You need to stay within 10m to Rob registry! - Now the registry is locked."; 5 cutText ["","PLAIN"]; _rip = false; }; 5 cutText ["","PLAIN"]; titleText[format["You have stolen $%1, now get away before the cops arrive!",[_kassa] call life_fnc_numberText],"PLAIN"]; deleteMarker "Marker200"; // by ehno delete maker life_cash = life_cash + _kassa; _rip = false; life_use_atm = false; sleep (30 + random(180)); life_use_atm = true; if!(alive _robber) exitWith {}; [getPlayerUID _robber,name _robber,"211"] remoteExec ["life_fnc_wantedAdd",2]; }; sleep 300; _action = _shop addAction["Rob the Gas Station",life_fnc_robstore]; _shop switchMove ""; Just copy paste. Configuring this is pretty easy aswell. to change the amount that can be robbed (red value is initial amount of money, green value is the amount it will randomly add or remove from the red value) _kassa = 1200 + round(random 600); Changing the amount of police needed to rob the store (Change red value to amount of officers online you want): if(_cops < 1) exitWith{hint "There isnt enough Police to rob Gas Station!";}; Changing the time it takes to rob the store (red value*100 = time in seconds to rob the bank. eg = 3*100=300 seconds to rob the store): if(_rip) then { while{true} do { sleep 1; _cP = _cP + 0.01; ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hope this helped you!
  13. 3 likes
    We're a new server and looking for players, EMS, and police, practically all applications are accepted. We got a great community, and you start with 3 million which is way more than enough to fund your terrorism. We're also looking for people to add to our staff, so if you think you're up to the task, ask on the forums! We have a very dedicated staff team and would love you. Website: http://www.abeloth.com - TeamSpeak: http://abeloth.ts.nfoservers.com - IP:162.248.88.26:2302 We look forward to seeing you!
  14. 2 likes
    You're not going to find anyone worth your while on here anyways, 99% of everyone here has their own server or is working on one. The remaining 1% of no name people will just fuck you over and cause you problems.
  15. 2 likes
    This is a dumb thread. Can we call it a day lads?
  16. 2 likes
  17. 2 likes
  18. 2 likes
    This whole convo is what kills communities, and gives this framework a bad name. I think this community should remove the advertising for other servers.
  19. 2 likes
    Not really my duty to make sure altis servers are good and free from abuse , But if this is true i would recommend sorting the issues at hand before continuing to advertise here buddy. Trust me servers that have abuse and advertise will bring you a'lot of hate even on here. No hate to anyone lol Just want members from alrpg joining decent servers
  20. 2 likes
    //~ (Tilda) case 41: { if(isPlayer cursorTarget) then { if(cursorTarget isKindOf "Man") then { hint format["%1",name cursorTarget]; } else { hint format["%1",name (driver cursorTarget)]; }; } else { if(cursorTarget isKindOf "Car" OR cursorTarget isKindOf "Air" OR cursorTarget isKindOf "Ship") then { hint format["%1",getText(configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "displayName")]; }; }; };
  21. 2 likes
    Hello, Here is a tutorial to increase the respawn time! This is a simple modification! It's sole objective is to increase the respawn time when a player request a medic! To give the medic the proper time to reach the dead player! I've recovered this from the archive - http://www.altisliferpg.com/topic/2768-tutorial-increasing-respawn-timer-after-requesting-medic/ It was developed for version 3.X of the framework, but I've modified it to work with 4.4R3, 5.0 and so on! Difficulty: Easy Author: Lukedbx (Not a 100% sure if he is the author, but he was the one that original posted this modification for version 3.x) Modified by: xShARkx Step 1. Open core\configuration.sqf Add the following in the backend variables section. life_request_timer = false; Step 2. Open core\medical\fn_onPlayerKilled Find: _RespawnBtn ctrlEnable false; waitUntil {_Timer ctrlSetText format [localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS"] call BIS_fnc_secondsToString]; round(_maxTime - time) <= 0 || isNull _this}; _RespawnBtn ctrlEnable true; _Timer ctrlSetText localize "STR_Medic_Respawn_2"; Change to: _RespawnBtn ctrlEnable false; waitUntil {_Timer ctrlSetText format [localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS"] call BIS_fnc_secondsToString]; round(_maxTime - time) <= 0 || isNull _this || life_request_timer}; if (life_request_timer) then { _maxTime = time + (LIFE_SETTINGS(getNumber,"respawn_timer") * 5); //multiples the respawn time set in the master config file by 5, to create the new respawn time! waitUntil {_Timer ctrlSetText format [localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS"] call BIS_fnc_secondsToString]; round(_maxTime - time) <= 0 || isNull _this}; }; life_request_timer = false; //resets increased respawn timer _RespawnBtn ctrlEnable true; _Timer ctrlSetText localize "STR_Medic_Respawn_2"; The whole section needs to look like this: //Create a thread for something? _unit spawn { private["_maxTime","_RespawnBtn","_Timer"]; disableSerialization; _RespawnBtn = ((findDisplay 7300) displayCtrl 7302); _Timer = ((findDisplay 7300) displayCtrl 7301); if (LIFE_SETTINGS(getNumber,"respawn_timer") < 5) then { _maxTime = time + 5; } else { _maxTime = time + LIFE_SETTINGS(getNumber,"respawn_timer"); }; _RespawnBtn ctrlEnable false; waitUntil {_Timer ctrlSetText format [localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS"] call BIS_fnc_secondsToString]; round(_maxTime - time) <= 0 || isNull _this || life_request_timer}; if (life_request_timer) then { _maxTime = time + (LIFE_SETTINGS(getNumber,"respawn_timer") * 5); //multiples the respawn time set in the master config file by 5, to create the new respawn time! waitUntil {_Timer ctrlSetText format [localize "STR_Medic_Respawn",[(_maxTime - time),"MM:SS"] call BIS_fnc_secondsToString]; round(_maxTime - time) <= 0 || isNull _this}; }; life_request_timer = false; //resets increased respawn timer _RespawnBtn ctrlEnable true; _Timer ctrlSetText localize "STR_Medic_Respawn_2"; }; Step 3. Open fn_requestMedic Add : life_request_timer = true; Above this part: //Create a thread to monitor duration since last request (prevent spammage). [] spawn { ((findDisplay 7300) displayCtrl 7303) ctrlEnable false; sleep (2 * 60); ((findDisplay 7300) displayCtrl 7303) ctrlEnable true; }; The whole file, should look like this: #include "..\..\script_macros.hpp" /* File: fn_requestMedic.sqf Author: Bryan "Tonic" Boardwine Description: N/A */ private "_medicsOnline"; _medicsOnline = {_x != player && {side _x isEqualTo independent} && {alive _x}} count playableUnits > 0; //Check if medics (indep) are in the room. life_corpse setVariable ["Revive",false,true]; //Set the corpse to a revivable state. if (_medicsOnline) then { //There is medics let's send them the request. [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",independent]; } else { //No medics were online, send it to the police. [life_corpse,profileName] remoteExecCall ["life_fnc_medicRequest",west]; }; life_request_timer = true; //Create a thread to monitor duration since last request (prevent spammage). [] spawn { ((findDisplay 7300) displayCtrl 7303) ctrlEnable false; sleep (2 * 60); ((findDisplay 7300) displayCtrl 7303) ctrlEnable true; }; There you go! Now when a player uses the request medic button, the respawn time will increase! You can edit how much it will increase by editing the number 5 in this part: _maxTime = time + (LIFE_SETTINGS(getNumber,"respawn_timer") * 5); //multiples the respawn time set in the master config file by 5, to create the new respawn time! Please be smart! Don't quote the first post with the tutorial, it's stupid and makes the comment page a hell to scroll down! Just quote the first post if you are going to added something, improve something or fix something and just quote the part that matters and not the whole post! if you need to reach me, thank me, complain to me and etc, just use @xShARkx! If you quote the first post for no good damn reason it will be reported and deleted!
  22. 2 likes
    Original Author: PapaBear Reupload: DaBombGamer Source: My Google Drive Coding Knowledge: Moderate Works on 4.0. Haven't tested 4.4 This is a barebones script. I am not including the Functions.hpp etc. If someone wants to put effort and do that, i'll happily add it to the main post Similar to @Repentz repost, but this is blackjack, and that... well it's slots. Sorry it's not a full release. Currently 4AM and don't feel like doing much coding. May add it in at a later time. CREDITS TO DEADLESSZOMBIE FOR THIS SOURCE. IF YOU DON'T KNOW HOW TO ADD THE REST IN: https://altisdev.com/topic/766/tuto-ajoutez-le-black-jack-d Next four files are in core\shops Create a file named fn_BJbet.sqf /* File: fn_BJbet.sqf Description: Blackjack Created by Blacklistgaming.org Coder: PapaBear */ private ["_betamt"]; _betamt = [_this,0,1,[0]] call BIS_fnc_param; disableSerialization; _display = findDisplay 5980; if(life_cash < _betamt) exitWith {hint format["You don't have enough money to play (%1$)",_betamt];}; life_cash = life_cash - _betamt; _Pcard1 = _display displayCtrl 5992; _Pcard2 = _display displayCtrl 5993; _Pcard3 = _display displayCtrl 5994; _Pcard4 = _display displayCtrl 5997; _Pcard5 = _display displayCtrl 5998; _Dcard1 = _display displayCtrl 5990; _Dcard2 = _display displayCtrl 5991; _Dcard3 = _display displayCtrl 5995; _Dcard4 = _display displayCtrl 5996; _bet1 = _display displayCtrl 5984; _bet2 = _display displayCtrl 5985; _bet3 = _display displayCtrl 5986; _bet4 = _display displayCtrl 5987; _Stay = _display displayCtrl 5982; _Hit = _display displayCtrl 5983; _TOTALTXT = _display displayCtrl 6007; _Pcard1 ctrlSetText ""; _Pcard2 ctrlSetText ""; _Pcard3 ctrlSetText ""; _Pcard4 ctrlSetText ""; _Pcard5 ctrlSetText ""; _Dcard1 ctrlSetText ""; _Dcard2 ctrlSetText ""; _Dcard3 ctrlSetText ""; _Dcard4 ctrlSetText ""; _TOTALTXT ctrlSetText "Total: "; _bet2KTEXT = _display displayCtrl 6003; _bet4KTEXT = _display displayCtrl 6004; _bet6KTEXT = _display displayCtrl 6005; _bet8KTEXT = _display displayCtrl 6006; _total = 0; _bet1 ctrlEnable false; _bet2 ctrlEnable false; _bet3 ctrlEnable false; _bet4 ctrlEnable false; _Hit ctrlEnable false; _Stay ctrlEnable false; switch ( _betamt ) do { case 2000: { _bet4KTEXT ctrlSetText ""; _bet6KTEXT ctrlSetText ""; _bet8KTEXT ctrlSetText ""; }; case 4000: { _bet2KTEXT ctrlSetText ""; _bet6KTEXT ctrlSetText ""; _bet8KTEXT ctrlSetText ""; }; case 6000: { _bet4KTEXT ctrlSetText ""; _bet2KTEXT ctrlSetText ""; _bet8KTEXT ctrlSetText ""; }; case 8000: { _bet4KTEXT ctrlSetText ""; _bet6KTEXT ctrlSetText ""; _bet2KTEXT ctrlSetText ""; }; default { _bet4KTEXT ctrlSetText ""; _bet6KTEXT ctrlSetText ""; _bet8KTEXT ctrlSetText ""; } }; // give dealer 1 card, other is XX // give player 2 cards _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; } else { if( _number == 13 ) then { _number = "ACE"; }; }; _Pcard1 ctrlSetText format["%1",_number]; sleep 0.5; _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; } else { if( _number == 13 ) then { _number = "ACE"; }; }; _Dcard1 ctrlSetText format["%1",_number]; sleep 0.5; _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; } else { if( _number == 13 ) then { _number = "ACE"; }; }; _Pcard2 ctrlSetText format["%1",_number]; _P1 = ctrlText _Pcard1; _P2 = ctrlText _Pcard2; _D1 = ctrlText _Dcard1; sleep 0.5; _winnings = _display displayCtrl 6001; _total = 0; if( _P1 == "ACE" ) then { if( _P2 == "10" ) then { _total = 21; }else { if( _P2 == "ACE" ) then { _total = 12; } else { _total = 11 + (parseNumber _P2); }; }; } else { if( _P2 == "ACE" ) then { if( _P1 == "10" ) then { _total = 21; } else { if( _P1 == "ACE" ) then { _total = 12; } else { _total = 11 + (parseNumber _P1); }; }; } else { _total = (parseNumber _P1) + (parseNumber _P2); }; }; _TOTALTXT ctrlSetText format["%1",_total]; if( _total == 21 ) then { _win = 4 * _betamt; life_cash = life_cash + _win; _winnings ctrlSetText format["%1",_win]; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; } else { _number = ceil(random 11); _number = _number + 2; //check if dealer got ace and then a 10. //10 then ace? if( _number == 13 ) then { _number = "ACE"; if( _D1 == "10" ) then { _Dcard2 ctrlSetText format["%1",_number]; _winnings = _display displayCtrl 6001; _winnings ctrlSetText "You Lose"; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; } else { _Dcard2 ctrlSetText "XX"; }; } else { if( _D1 == "ACE" ) then { if( _number == 10 ) then { _Dcard2 ctrlSetText format["%1",_number]; _winnings = _display displayCtrl 6001; _winnings ctrlSetText "You Lose"; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; } else { _Dcard2 ctrlSetText "XX"; }; } else { _Dcard2 ctrlSetText "XX"; }; }; _Hit ctrlEnable true; _Stay ctrlEnable true; }; Now in the same folder create fn_BJhit.sqf /* File: fn_BJhit.sqf Description: Blackjack Created by Blacklistgaming.org Coder: PapaBear */ //hit phase //check value of cards //stop if bust //if 5th hit and still good win disableSerialization; _display = findDisplay 5980; //setup variables _Pcard1 = _display displayCtrl 5992; _Pcard2 = _display displayCtrl 5993; _Pcard3 = _display displayCtrl 5994; _Pcard4 = _display displayCtrl 5997; _Pcard5 = _display displayCtrl 5998; _TOTALTXT = _display displayCtrl 6007; _bet2KTEXT = _display displayCtrl 6003; _bet4KTEXT = _display displayCtrl 6004; _bet6KTEXT = _display displayCtrl 6005; _bet8KTEXT = _display displayCtrl 6006; _betamt = 0; if( (ctrlText _bet2KText) != "" ) then { _betamt = 2000; } else { if( (ctrlText _bet4KText) != "" ) then { _betamt = 4000; } else { if( (ctrlText _bet6KText) != "" ) then { _betamt = 6000; } else { _betamt = 8000; }; }; }; _gameover = false; _bet1 = _display displayCtrl 5984; _bet2 = _display displayCtrl 5985; _bet3 = _display displayCtrl 5986; _bet4 = _display displayCtrl 5987; _Stay = _display displayCtrl 5982; _Hit = _display displayCtrl 5983; _winnings = _display displayCtrl 6001; _bet1 ctrlEnable false; _bet2 ctrlEnable false; _bet3 ctrlEnable false; _bet4 ctrlEnable false; _Hit ctrlEnable false; _Stay ctrlEnable false; _P1T = ctrlText _Pcard1; _P2T = ctrlText _Pcard2; _P3T = ctrlText _Pcard3; _P4T = ctrlText _Pcard4; _P5T = ctrlText _Pcard5; _ACES = false; _ACE1 = 0; _ACE2 = 0; _ACE3 = 0; _ACE4 = 0; _total = 0; _win = 0; _cash = 0; //figure out which card is next to be dealt _NextCard = 0; if(_P3T != "" ) then { if(_P4T != "" ) then { _NextCard = 5; } else { _NextCard = 4; }; } else { _NextCard = 3; }; //deal next card _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; } else { if( _number == 13 ) then { _number = "ACE"; }; }; //assign card to its place switch ( _NextCard ) do { case 3: { _Pcard3 ctrlSetText format["%1",_number]; _P3T = ctrlText _Pcard3; }; case 4: { _Pcard4 ctrlSetText format["%1",_number]; _P4T = ctrlText _Pcard4; }; case 5: { _Pcard5 ctrlSetText format["%1",_number]; _P5T = ctrlText _Pcard5; }; default { _Pcard3 ctrlSetText format["%1",_number]; _P3T = ctrlText _Pcard3; } }; _totalAces = 0; //check if there are any aces //and where they are if( _P1T == "ACE" ) then { _ACES = true; _ACE1 = 1; _totalAces = 1; }; if( _P2T == "ACE" ) then { _ACES = true; if( _ACE1 == 0 ) then { _ACE1 = 2; _totalAces = 1; } else { _ACE2 = 2; _totalAces = 2; }; }; if( _P3T == "ACE" ) then { _ACES = true; if( _ACE1 == 0 ) then { _ACE1 = 3; _totalAces = 1; } else { if( _ACE2 == 0 ) then { _ACE2 = 3; _totalAces = 2; } else { _ACE3 = 3; _totalAces = 3; }; }; }; if( _P4T == "ACE" ) then { _ACES = true; if( _ACE1 == 0 ) then { _ACE1 = 4; _totalAces = 1; } else { if( _ACE2 == 0 ) then { _ACE2 = 4; _totalAces = 2; } else { if( _ACE3 == 0 ) then { _ACE3 = 4; _totalAces = 3; } else { _ACE4 = 4; _totalAces = 4; }; }; }; }; if( _P5T == "ACE" ) then { _ACES = true; if( _ACE1 == 0 ) then { _ACE1 = 5; _totalAces = 1; } else { if( _ACE2 == 0 ) then { _ACE2 = 5; _totalAces = 2; } else { if( _ACE3 == 0 ) then { _ACE3 = 5; _totalAces = 3; } else { _ACE4 = 5; _totalAces = 4; }; }; }; }; _temp1 = 0; _temp2 = 0; //aces check complete. //now we need total the players cards //if there are aces we need to compare // 11 vs 1 totals // the total values of whether is 21 or under if( _ACES ) then { if( _ACE4 != 5 OR _ACE3 != 5 OR _ACE2 != 5 OR _ACE1 != 5 ) then { _total = _total + (parseNumber _P5T); }; if( _ACE4 != 4 OR _ACE3 != 4 OR _ACE2 != 4 OR _ACE1 != 4 ) then { _total = _total + (parseNumber _P4T); }; if( _ACE3 != 3 OR _ACE2 != 3 OR _ACE1 != 3 ) then { _total = _total + (parseNumber _P3T); }; if( _ACE2 != 2 OR _ACE1 != 2 ) then { _total = _total + (parseNumber _P2T); }; if( _ACE1 != 1 ) then { _total = _total + (parseNumber _P1T); }; switch ( _totalAces ) do { case 4: { //11,1,1,1 _temp1 = 14; //1,1,1,1 _temp2 = 4; }; case 3: { //11,1,1 _temp1 = 13; //1,1,1 _temp2 = 3; }; case 2: { //11,1 _temp1 = 12; //1,1 _temp2 = 2; }; case 1: { //11 _temp1 = 11; //1 _temp2 = 1; }; default {_temp1 = 0; _temp2 = 0;} }; _totalTemp = _total + _temp2; _total = _total + _temp1; //if player hit 21 then he wins 4X if( _total == 21 ) then { _TOTALTXT ctrlSetText format["%1",_total]; _win = 4; } else { //player didnt hit 21 //now check if he went bust using the 11 //if he didnt then can keep playing if( _total > 21 ) then { //using 11 he went over 21 //lets check if he is still over using a 1 instead //if over 21 he loses, else keeps playing if( _totalTemp > 21 ) then { _TOTALTXT ctrlSetText format["%1",_totalTemp]; _gameover = true; } else { //if using 1 in total and still under 21 //while using 5 cards, player wins 3X if( _NextCard == 5 ) then { _win = 4; } else { _TOTALTXT ctrlSetText format["%1",_totalTemp]; }; }; } else { _TOTALTXT ctrlSetText format["%1",_total]; }; }; } else { // NO ACES!!!! Total all cards _total = (parseNumber _P1T) + (parseNumber _P2T) + (parseNumber _P3T) + (parseNumber _P4T) + (parseNumber _P5T); _TOTALTXT ctrlSetText format["%1",_total]; //if hit 21, win if( _total == 21 ) then { _win = 4; _gameover = true; } else { if( _total > 21 ) then { _gameover = true; }; }; }; //last check to see if they lose, win,still playing if( _gameover ) then { if( _win != 0 ) then { _cash = _betamt * _win; life_cash = life_cash + _cash; _winnings ctrlSetText format["%1",_cash]; //you win, give money //set text //free up bet buttons } else { _winnings ctrlSetText "You lose. BUST"; //you lose //set text //free up bet buttons }; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; _bet2KTEXT ctrlSetText "BET"; _bet4KTEXT ctrlSetText "BET"; _bet6KTEXT ctrlSetText "BET"; _bet8KTEXT ctrlSetText "BET"; _Hit ctrlEnable false; _Stay ctrlEnable false; } else { //below 21, can still play //free up hit/stay buttons. _Hit ctrlEnable true; _Stay ctrlEnable true; }; In the same folder (again lol) create fn_BJstay.sqf /* File: fn_BJstay.sqf Description: Blackjack Created by Blacklistgaming.org Coder: PapaBear */ //stay //calculate value of player //reveal dealer //if dealer higher, lose //if dealer lower, dealer hit. //check dealer value, win/lose hits. disableSerialization; _display = findDisplay 5980; //setup variables _Pcard1 = _display displayCtrl 5992; _Pcard2 = _display displayCtrl 5993; _Pcard3 = _display displayCtrl 5994; _Pcard4 = _display displayCtrl 5997; _Dcard1 = _display displayCtrl 5990; _Dcard2 = _display displayCtrl 5991; _Dcard3 = _display displayCtrl 5995; _Dcard4 = _display displayCtrl 5996; _TOTALTXT = _display displayCtrl 6007; _bet2KTEXT = _display displayCtrl 6003; _bet4KTEXT = _display displayCtrl 6004; _bet6KTEXT = _display displayCtrl 6005; _bet8KTEXT = _display displayCtrl 6006; _betamt = 0; if( (ctrlText _bet2KText) != "" ) then { _betamt = 2000; } else { if( (ctrlText _bet4KText) != "" ) then { _betamt = 4000; } else { if( (ctrlText _bet6KText) != "" ) then { _betamt = 6000; } else { _betamt = 8000; }; }; }; _bet1 = _display displayCtrl 5984; _bet2 = _display displayCtrl 5985; _bet3 = _display displayCtrl 5986; _bet4 = _display displayCtrl 5987; _Stay = _display displayCtrl 5982; _Hit = _display displayCtrl 5983; _winnings = _display displayCtrl 6001; _bet1 ctrlEnable false; _bet2 ctrlEnable false; _bet3 ctrlEnable false; _bet4 ctrlEnable false; _Hit ctrlEnable false; _Stay ctrlEnable false; _P1T = ctrlText _Pcard1; _P2T = ctrlText _Pcard2; _P3T = ctrlText _Pcard3; _P4T = ctrlText _Pcard4; _D1T = ctrlText _Dcard1; _gameover = false; _totalPlayer = 0; _totalDealer = 0; _totalDealer2 = 0; _totalDealer3 = 0; _totalDealer4 = 0; _totalPlayer = ctrlText _TOTALTXT; _totalPlayer = parseNumber _totalPlayer; _totalDealer = 0; _win = 0; _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; } else { if( _number == 13 ) then { _number = 10; }; }; _Dcard2 ctrlSetText format["%1",_number]; if( _D1T == "ACE" ) then { if( _number == 10 ) then { _totalDealer = 21; } else { _totalDealer = 11 + _number; }; } else { _totalDealer = _number + (parseNumber _D1T); }; if( _totalDealer > _totalPlayer ) then { //dealer beat player //dealer wins //no money for player _gameover = true; } else { if( _totalDealer == _totalPlayer ) then { //tie, betamt won back _win = 1; _gameover = true; } else { _gameover = false; }; }; if( !_gameover ) then { _number = ceil(random 11); _number = _number + 2; if ( _number == 11 OR _number == 12 ) then { _number = 10; _Dcard3 ctrlSetText format["%1",_number]; } else { if( _number == 13 ) then { _Dcard3 ctrlSetText "ACE"; } else { _Dcard3 ctrlSetText format["%1",_number]; }; }; if( _number == 13 ) then { _totalTemp = _totalDealer + 11; _totalTemp2 = _totalDealer + 1; if( _totalTemp == 21 OR _totalTemp2 == 21 ) then { _gameover = true; } else { if( _totalTemp > 21 AND _totalTemp2 > 21 ) then { _gameover = true; _win = 2; }; }; if( !_gameover ) then { if( _totalTemp > _totalPlayer ) then { if( _totalTemp < 21 ) then { _gameover = true; }; } else { if( _totalTemp2 > _totalPlayer ) then { if( _totalTemp2 < 21 ) then { _gameover = true; }; }; }; }; } else { //should check for aces... but ya _totalDealer = _totalDealer + _number; if( _totalDealer > 21 ) then { //player wins //dealer bust _gameover = true; _win = 2; } else { if( _totalDealer > _totalPlayer ) then { //dealer beats player _gameover = true; } else { if( _totalDealer == _totalPlayer ) then { _gameover = true; _win = 1; } else { _gameover = false; }; }; }; }; }; //draw another card for dealer... card 4. fuck this shit.... if( !_gameover ) then { _win = 2; }; //last check to see if they lose, win,still playing if( _win != 0 ) then { _cash = _betamt * _win; life_cash = life_cash + _cash; _winnings ctrlSetText format["%1",_cash]; //you win, give money //set text //free up bet buttons } else { _winnings ctrlSetText "You lose. Dealer Wins."; //you lose //set text //free up bet buttons }; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; _bet2KTEXT ctrlSetText "BET"; _bet4KTEXT ctrlSetText "BET"; _bet6KTEXT ctrlSetText "BET"; _bet8KTEXT ctrlSetText "BET"; Again in the same folder lmao, create fn_blackjack.sqf /* File: fn_blackjack.sqf Description: Blackjack Created by Blacklistgaming.org Coder: PapaBear */ if(!dialog) then { createDialog "BlackjackGUI"; }; disableSerialization; _display = findDisplay 5980; _Hit = _display displayCtrl 5983; _Stay = _display displayCtrl 5982; _Hit ctrlEnable false; _Stay ctrlEnable false; _bet1 = _display displayCtrl 5984; _bet2 = _display displayCtrl 5985; _bet3 = _display displayCtrl 5986; _bet4 = _display displayCtrl 5987; _bet1 ctrlEnable true; _bet2 ctrlEnable true; _bet3 ctrlEnable true; _bet4 ctrlEnable true; Now, go to your dialog folder and create blackjack.hpp /*Created by Blacklistgaming.org Coder: PapaBear */ #define GUI_GRID_X (0) #define GUI_GRID_Y (0) #define GUI_GRID_W (0.025) #define GUI_GRID_H (0.04) #define GUI_GRID_WAbs (1) #define GUI_GRID_HAbs (1) class BlackjackGUI { idd = 5980; name="black_jack"; movingEnabled = 0; enableSimulation = 1; onLoad = ""; class controlsBackground { class RscFrame_1800: life_RscText { idc = 5981; colorBackground[] = {0,0,0,0.7}; x = 3 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 31 * GUI_GRID_W; h = 20.5 * GUI_GRID_H; }; class RscText_1000: life_RscText { idc = 5988; text = "Dealer"; //--- ToDo: Localize; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 3 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 2 * GUI_GRID_H; }; class RscText_1001: life_RscText { idc = 5989; text = "Player"; //--- ToDo: Localize; x = 20 * GUI_GRID_W + GUI_GRID_X; y = 3 * GUI_GRID_H + GUI_GRID_Y; w = 6 * GUI_GRID_W; h = 2 * GUI_GRID_H; }; class RscText_1012: life_RscText { idc = 5999; text = "BLACKJACK"; //--- ToDo: Localize; x = 9 * GUI_GRID_W + GUI_GRID_X; y = 1 * GUI_GRID_H + GUI_GRID_Y; w = 18.5 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; sizeEx = 3 * GUI_GRID_H; }; class RscText_1013: life_RscText { idc = 6000; text = "Winnings: $"; //--- ToDo: Localize; x = 5.5 * GUI_GRID_W + GUI_GRID_X; y = 15 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; }; class controls { class STAY_BTN: life_RscButtonMenu { idc = 5982; text = "Stay"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[] spawn life_fnc_BJstay;"; x = 20 * GUI_GRID_W + GUI_GRID_X; y = 14.5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class HIT_BTN: life_RscButtonMenu { idc = 5983; text = "Hit"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[] spawn life_fnc_BJhit;"; x = 27 * GUI_GRID_W + GUI_GRID_X; y = 14.5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class TOTAL: life_RscText { idc = 6007; text = "Total: "; //--- ToDo: Localize; x = 28 * GUI_GRID_W + GUI_GRID_X; y = 10.5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class BET_5K: life_RscButtonMenu { idc = 5984; text = "2K"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[2000] spawn life_fnc_BJbet;"; x = 6 * GUI_GRID_W + GUI_GRID_X; y = 19 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class BET_10K: life_RscButtonMenu { idc = 5985; text = "4K"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[4000] spawn life_fnc_BJbet;"; x = 13 * GUI_GRID_W + GUI_GRID_X; y = 19 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class BET_25K: life_RscButtonMenu { idc = 5986; text = "6K"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[6000] spawn life_fnc_BJbet;"; x = 20 * GUI_GRID_W + GUI_GRID_X; y = 19 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class BET_50K: life_RscButtonMenu { idc = 5987; text = "8K"; //--- ToDo: Localize; //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}; colorBackground[] = {0.2,0.3,0.9,0.7}; onButtonClick = "[8000] spawn life_fnc_BJbet;"; x = 27 * GUI_GRID_W + GUI_GRID_X; y = 19 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Dealer_Card_1: life_RscText { idc = 5990; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Dealer_Card_2: life_RscText { idc = 5991; x = 9.5 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Player_Card_1: life_RscText { idc = 5992; x = 20.5 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Player_Card_2: life_RscText { idc = 5993; x = 24.5 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Player_Card_3: life_RscText { idc = 5994; x = 28.5 * GUI_GRID_W + GUI_GRID_X; y = 5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Dealer_Card_4: life_RscText { idc = 5995; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 8 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Dealer_Card_5: life_RscText { idc = 5996; x = 9.5 * GUI_GRID_W + GUI_GRID_X; y = 8 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Player_Card_4: life_RscText { idc = 5997; x = 20.5 * GUI_GRID_W + GUI_GRID_X; y = 8 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Player_Card_5: life_RscText { idc = 5998; x = 24.5 * GUI_GRID_W + GUI_GRID_X; y = 8 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Winnings: life_RscText { idc = 6001; x = 11 * GUI_GRID_W + GUI_GRID_X; y = 15 * GUI_GRID_H + GUI_GRID_Y; w = 5 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class EXIT_BTN: life_RscButtonMenu { idc = 6002; text = "EXIT"; //--- ToDo: Localize; 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 = "closeDialog 0;"; x = 30 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; class RscText_1015: life_RscText { idc = 6003; text = "BET"; //--- ToDo: Localize; x = 7 * GUI_GRID_W + GUI_GRID_X; y = 18 * GUI_GRID_H + GUI_GRID_Y; w = 2 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; class RscText_1016: life_RscText { idc = 6004; text = "BET"; //--- ToDo: Localize; x = 14 * GUI_GRID_W + GUI_GRID_X; y = 18 * GUI_GRID_H + GUI_GRID_Y; w = 2 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; class RscText_1017: life_RscText { idc = 6005; text = "BET"; //--- ToDo: Localize; x = 21 * GUI_GRID_W + GUI_GRID_X; y = 18 * GUI_GRID_H + GUI_GRID_Y; w = 2 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; class RscText_1018: life_RscText { idc = 6006; text = "BET"; //--- ToDo: Localize; x = 28 * GUI_GRID_W + GUI_GRID_X; y = 18 * GUI_GRID_H + GUI_GRID_Y; w = 2 * GUI_GRID_W; h = 1 * GUI_GRID_H; }; }; }; That's the base script. Enjoy!
  23. 2 likes
    Hello, Check this out : _mySound = playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", player]; //alarm https://community.bistudio.com/wiki/playSound3D You got everything you need
  24. 2 likes
    Author: No ide Posted By: Kaiman Original Post: Step 1. Go into your description.ext and comment out: #include "dialog\hud_stats.hpp" To make it like this, //#include "dialog\hud_stats.hpp" or /*#include "dialog\hud_stats.hpp"*/ Step 2. go into "core\functions\fn_hudSetup.sqf" and comment out #include "..\..\script_macros.hpp" /* File: fn_hudSetup.sqf Author: Bryan "Tonic" Boardwine Description: Setups the hud for the player? */ disableSerialization; cutRsc ["playerHUD", "PLAIN", 2, false]; [] call life_fnc_hudUpdate; [] spawn { private["_dam"]; for "_i" from 0 to 1 step 0 do { _dam = damage player; waitUntil {(damage player) != _dam}; [] call life_fnc_hudUpdate; }; }; To make it look like: #include "..\..\script_macros.hpp" /* File: fn_hudSetup.sqf Author: Bryan "Tonic" Boardwine Description: Setups the hud for the player? */ /* disableSerialization; cutRsc ["playerHUD", "PLAIN", 2, false]; [] call life_fnc_hudUpdate; [] spawn { private["_dam"]; for "_i" from 0 to 1 step 0 do { _dam = damage player; waitUntil {(damage player) != _dam}; [] call life_fnc_hudUpdate; }; }; */ Step 4. go into "core\functions\fn_hudUpdate.sqf" and comment out: #include "..\..\script_macros.hpp" /* File: fn_hudUpdate.sqf Author: Daniel Stuart Description: Updates the HUD when it needs to. */ disableSerialization; if (isNull LIFEdisplay) then {[] call life_fnc_hudSetup;}; LIFEctrl(2200) progressSetPosition (life_hunger / 100); LIFEctrl(2201) progressSetPosition (1 - (damage player)); LIFEctrl(2202) progressSetPosition (life_thirst / 100); To make it look like: #include "..\..\script_macros.hpp" /* File: fn_hudUpdate.sqf Author: Daniel Stuart Description: Updates the HUD when it needs to. */ /* disableSerialization; if (isNull LIFEdisplay) then {[] call life_fnc_hudSetup;}; LIFEctrl(2200) progressSetPosition (life_hunger / 100); LIFEctrl(2201) progressSetPosition (1 - (damage player)); LIFEctrl(2202) progressSetPosition (life_thirst / 100); */
  25. 2 likes
    Now now why don't we all take it down a notch. What you are looking for is in fn_bountyBuy.sqf
  26. 2 likes
    Just be grateful anyone is helping you at all. Nobody has to help you on here but people are taking the time out of their day to help you with something as simple as changing a bit of text.
  27. 2 likes
    He speaks the truth m8.
  28. 2 likes
    Toni's Barrier Menu Q: What is it? A: It is a Small script contained within an Addon that allows users to spawn barriers, It can be loaded client side as an addon or ported into a mission file with a little effort Q: Didn't Someone Already Make a Script Similar to this? A: Yes, Warnerm14 did for Altis Life Framework but his was based on AddActions. Mine is A full GUI based solution and its modular (Can be used as a standalone addon or ported into a mission framework) Features: Inventory button for easy access, Simple to use GUI, Fully customizable, Portable to a mission file if the addon is not what you need. Links: Download/View Source Code From Github Download From Google Drive Lemme know what you all think and feel free to leave a reply with opinions. Please Report issues on Github! Questions?, Comments?, Need help setting this up on your server? Join My Discord Video: https://i.gyazo.com/3b28d217710fe10cd44f55ae212edd56.mp4
  29. 2 likes
    Before we start yes I know this is a simple script, but I like quality roleplay! Tested on 4.4r4 Difficulty: Copy & paste Author: Silencedaxis What this script does: This script allows a player to buy a wedding ring and when used it displays text and gives them 500 in cash! If you wanted to you could easily add it to play a sound! I did not do that since I personally would not like that its all based on preference! This is just to make roleplay better since little things like these can make a big difference in the long run! Step 1:Adding the item In Config_vItems add! And make sure to add it in the stores you want! class weddingring { variable = "weddingring"; displayName = "STR_Item_Wedding"; weight = 1; buyPrice = 1000; sellPrice = 300; illegal = false; edible = -1; icon = "icons\ico_wedding.paa"; }; In your stringtable add <Key ID="STR_Item_Wedding"> <Original>Wedding Ring</Original> </Key> Step 2:Adding the script Create a file in core\items and call it fn_ring.sqf: /* file: fn_ring.sqf Author: Silencedaxis(AKA Scott Lee) Description: Makes the wedding ring work! */ //Closes the player's inventory closeDialog 0; //Adds a message to the player's screen hint "You have just gotten married! Congratulations! Here is $500 in cash!"; sleep 3; //Adds the money! _funds = 500; life_cash = life_cash + _funds; Open fn_useItem.sqf and add case (_item isEqualTo "weddingring"): { if(([false,_item,1] call life_fnc_handleInv)) then { [] spawn life_fnc_ring; }; }; under: case (_item isEqualTo "lockpick"): { [] spawn life_fnc_lockpick; closeDialog 0; }; Open Functions.hpp and add this under class items class ring {}; So it looks like this: class Items { file = "core\items"; class blastingCharge {}; class boltcutter {}; class defuseKit {}; class flashbang {}; class jerrycanRefuel {}; class jerryRefuel {}; class lockpick {}; class placestorage {}; class spikeStrip {}; class storageBox {}; class ring {}; }; Finally, add the icon to your icons folder! I listed a sound if you want one too! ico_wedding.paa wedding.ogg
  30. 2 likes
    Hey guys i want to share my Sellall script with you to start of create in the directory core/shops/ a new sqf called "fn_virt_sellAll.sqf and paste the code in #include "..\..\script_macros.hpp" /* File: fn_virt_sell.sqf Author: Bryan "Tonic" Boardwine Description: Sell a virtual item to the store / shop */ private ["_type","_index","_price","_amount","_name"]; if ((lbCurSel 2402) isEqualTo -1) exitWith {}; _type = lbData[2402,(lbCurSel 2402)]; _price = M_CONFIG(getNumber,"VirtualItems",_type,"sellPrice"); if (_price isEqualTo -1) exitWith {}; _amount = ITEM_VALUE(_type); if ((time - life_action_delay) < 0.2) exitWith {hint localize "STR_NOTF_ActionDelay";}; life_action_delay = time; _price = (_price * _amount); _name = M_CONFIG(getText,"VirtualItems",_type,"displayName"); if ([false,_type,_amount] call life_fnc_handleInv) then { hint format [localize "STR_Shop_Virt_SellItem",_amount,(localize _name),[_price] call life_fnc_numberText]; CASH = CASH + _price; [0] call SOCK_fnc_updatePartial; [] call life_fnc_virt_update; }; if (life_shop_type isEqualTo "drugdealer") then { private ["_array","_ind","_val"]; _array = life_shop_npc getVariable ["sellers",[]]; _ind = [getPlayerUID player,_array] call TON_fnc_index; if (!(_ind isEqualTo -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 [getPlayerUID player,profileName,_price]; life_shop_npc setVariable ["sellers",_array,true]; }; }; if (life_shop_type isEqualTo "gold" && (LIFE_SETTINGS(getNumber,"noatm_timer")) > 0) then { [] spawn { life_use_atm = false; sleep ((LIFE_SETTINGS(getNumber,"noatm_timer")) * 60); life_use_atm = true; }; }; [3] call SOCK_fnc_updatePartial; next open in the root directory your functions.h or functions.hpp (depending on version) and add under class Shops { the following: class virt_sellAll {}; it should look like this then: class Shops { file = "core\shops"; class atmMenu {}; class buyClothes {}; class changeClothes {}; class chopShopMenu {}; class chopShopSelection {}; class chopShopSell {}; class clothingFilter {}; class clothingMenu {}; class fuelLBchange {}; class fuelStatOpen {}; class levelCheck {}; class vehicleShop3DPreview {}; class vehicleShopBuy {}; class vehicleShopEnd3DPreview {}; class vehicleShopInit3DPreview {}; class vehicleShopLBChange {}; class vehicleShopMenu {}; class virt_buy {}; class virt_menu {}; class virt_sellAll {}; class virt_sell {}; class virt_update {}; class weaponShopAccs {}; class weaponShopBuySell {}; class weaponShopFilter {}; class weaponShopMags {}; class weaponShopMenu {}; class weaponShopSelection {}; }; next of we have to edit the sell menu(add the new button) therefor open dialog/shop_items.hpp and add a button like this: class ButtonRemoveAllG: Life_RscButtonMenu { idc = -1; text = "Sell. All"; 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 = "[] call Life_fnc_virt_sellAll;"; x = 0.592716 * safezoneW + safezoneX; y = 0.71 * safezoneH + safezoneY; w = 0.103125 * safezoneW; h = 0.033 * safezoneH; }; if this is done the sell all button should work in markets like Altis market or the mission sellpoints for copper iron etc.
  31. 2 likes
    Greetings, Elite IV here. Quite a few people here know me and I've been around these forums before the website wipe so its quite amazing how AltisLifeRPG has pushed through and is still being maintained, I'm 18 years old turning 19 on July. I've always been fascinated in creating and working on something other people can enjoy, whether its community wise or development wise. I've been scripting in Arma 3 for about 3 years now and I have to say its my favourite language. I started off with Java working on RSPS's (RuneScape Private Servers) and worked with them for 2 years prior to meeting Arma 3. Its funny because I created a RSPS before I knew about Arma 3 and I received quite a large amount of donations cause to be honest I made my server pay to win and it didn't last long but after having that spare cash there I ended up stumbling upon Altis Life RPG videos via YouTube, I had to get the game, and yeah its pretty much kicked off from there. I would say in the 3 years I have been working with Arma 3 Scripting i am in the intermediate area on the pie chart. I know most arma 3 commands off by heart. I would love to be a helper because i have dedicated so much time and love to this community and i have to admit i have broken a few forum rules and i wish i didn't but everyone makes mistakes and i hope i can prove myself worthy for this position. Ever since i saw this helper recruitment category in the forums i have been so keen to make a thread but never got around to it, tell you what, I was super stoked when i saw this opportunity for members that love this community to help out and be some-what a role model to current and future AltisLifeRPG community members. I will defiantly bring to the community fast and active support within my spare time. The current helpers that have been recruited are doing a great job so far so props to them. If i was to achieve earning this position this would be all i ever wanted, Being moderator or somewhat higher in the future is defiantly something i would be interested in but my main focus is just to become a helper. I hope this application is appealing, thank you for reading. Regards, Elite IV ~ Community Leader & Developer of XtG Community AU/NZ
  32. 2 likes
    Fixed this once again, aparently I cannot use this as a function had to use it as a script, fully tested on 5.0 and works, leave me alone now...
  33. 2 likes
    Difficulty: Easy Create Original Idea : Kuchiha Authors: AlaskaVet Okay in core/items make a new file called "fn_weed.sqf" /* Author:AlaskaVet */ //Close inventory closeDialog 0; //Little hint then wait a litle before starting drugs effects hint "Winners don't use drugs !"; sleep 3; //Activate ppEffects we need "chromAberration" ppEffectEnable true; "radialBlur" ppEffectEnable true; enableCamShake true; _smoke = "SmokeShellGreen" createVehicle position player; if (vehicle player != player) then { _smoke attachTo [vehicle player, [-0.6,-1,0]]; } else { _smoke attachTo [player, [0,-0.1,1.5]]; }; //Let's go for 45secs of effetcs for "_i" from 0 to 44 do { "chromAberration" ppEffectAdjust [random 0.25,random 0.25,true]; "chromAberration" ppEffectCommit 1; "radialBlur" ppEffectAdjust [random 0.02,random 0.02,0.15,0.15]; "radialBlur" ppEffectCommit 1; addcamShake[random 3, 1, random 3]; sleep 1; }; //Stop effects "chromAberration" ppEffectAdjust [0,0,true]; "chromAberration" ppEffectCommit 5; "radialBlur" ppEffectAdjust [0,0,0,0]; "radialBlur" ppEffectCommit 5; sleep 6; //Deactivate ppEffects "chromAberration" ppEffectEnable false; "radialBlur" ppEffectEnable false; resetCamShake; Now go Into core/pmenu & open "fn_useItem.sqf" Add under like lock picks like so: case (_item isEqualTo "lockpick"): { [] spawn life_fnc_lockpick; closeDialog 0; }; case (_item isEqualTo "marijuana"): { if(([false,_item,1] call life_fnc_handleInv)) then { [] spawn life_fnc_weed; }; }; Then Go into file "Functions.h" find "class Items" and add: class weed {};
  34. 2 likes
    Don't forget to add the wasted sound aswell! wasted.ogg
  35. 2 likes
    Just click the "Like this" button and we are good hahaha
  36. 2 likes
    Tell us about yourself: Im Gary im 21 from the UK, I've spent pretty my whole life in front of my pc i have helped mange forums before but i wouldn't really be looking for a moderator position as id rather be a helper due to running my own altis server ,id say im reasonable experience with SQF and coding ect i can do php ,hmtl ,sfq, sql,c++ im not a expert but i know what im doing that's why i am seeing this a learning opportunity rather than a helping position as if i get this id be on here more, There for id be gaining more experience daily , as i says id like to help to gain more experience but also id like to give something back to this community as my server wouldn't be where it is now if it wasn't for everyone here now im in a position to offer help back and help out writing up tutorials and building new scripts and putting ideas on the table. if you'd like to talk more pm me or you can get me almost any time on my ts ... a3rplife.co.uk
  37. 2 likes
    Want a picture? Not associated with any of your shit anymore and surely not associated with Ryan who originally did what happened. But you know, it's fine have a good day Sidewinder, nice talking to you!
  38. 2 likes
    I don't personally use this strider anymore, so I am giving it to the public. Yes, I did make this as a fyi. policeStrider.jpg
  39. 2 likes
    Made a mistake and put the variable name and not the class name.
  40. 2 likes
    If you know what you are doing, this should help fit the pieces of the puzzle https://altisdev.com/topic/766/tuto-ajoutez-le-black-jack-d Your welcome
  41. 2 likes
    Not a very detailed tutorial for the entirely new people in this area so I'm gonna put a little extra information so EVERYONE can follow! Follow the above tutorial up until step 3 and then follow this (This is basically just a re-made step 3. Create a folder in root called scripts if you don't have one already. Inside of that folder create a folder called status_bar. Throw the Images folder, init_statusBar.sqf and playerBar.sqf into the status_bar folder. Navigate to the Dialog folder in root and put the statusBar.hpp file in there. Also this is what the status bar looks like since you can't see the picture linked in the post unless you are logged in on the site. And obviously by posting this comment means that the statusbar does indeed work
  42. 2 likes
    @Evo | Lokiro LOL the dev advert you in the installation guide he made that, is for give you futur support if he need to be connect on your server. You are free to take it off or not. Totaly impertinent post...
  43. 2 likes
    Try this one /* File: safezone.sqf Edited by: Tyler - ALRPG Profile: http://goo.gl/VmgCB0 Description: Allows you to setup markers that execute the SafeZone script. Note: A lot of this is just C&P with different code. It's kinda simple to add / remove stuff */ #define POLICE_ZONES [["pz_xx", 25]] #define CIV_ZONES [["cz_xx", 25]] #define PZ_MSG hintC "Shooting Inside Police HQ Is Not Allowed!" #define CIV_MSG hintC "You are In a Civilian Safezone! Stop Shooting or you can be banned or kicked!" if (isDedicated) exitWith {}; waitUntil {!isNull player}; switch (playerSide) do { case civilian: { player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count POLICE_ZONES > 0) then { deleteVehicle (_this select 6); titleText [PZ_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of Police HQ Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count CIV_ZONES > 0) then { deleteVehicle (_this select 6); titleText [CIV_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of A Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; }; case west: { player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count POLICE_ZONES > 0) then { deleteVehicle (_this select 6); titleText [PZ_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of Police HQ Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; }; };
  44. 2 likes
    My safe zones seem to work just fine. Do you have the markers on the map down? This is my script /* File: safezone.sqf Edited by: Tyler - ALRPG Profile: http://goo.gl/VmgCB0 Description: Allows you to setup markers that execute the SafeZone script. Note: A lot of this is just C&P with different code. It's kinda simple to add / remove stuff */ #define POLICE_ZONES [["pz_xx", 19]] #define CIV_ZONES [["cz_xx", 15]] #define PZ_MSG "Shooting Inside Police HQ Is Not Allowed!" #define CIV_MSG "You are entering a Civilian SafeZone. Do not commit crimes, rob people, or kill!" if (isDedicated) exitWith {}; waitUntil {!isNull player}; switch (playerSide) do { case civilian: { player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count POLICE_ZONES > 0) then { deleteVehicle (_this select 6); titleText [PZ_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of Police HQ Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count CIV_ZONES > 0) then { deleteVehicle (_this select 6); titleText [CIV_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of A Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; }; case west: { player addEventHandler ["Fired", { if ({(_this select 0) distance getMarkerPos (_x select 0) < _x select 1} count POLICE_ZONES > 0) then { deleteVehicle (_this select 6); titleText [PZ_MSG, "PLAIN", 3]; diag_log format ["%1 Shot Inside Of A Safezone At %2", profileName, time]; [0,format["%1 - Is Shooting Inside Of Police HQ Safezone!",profileName]] remoteExec ["life_fnc_broadcast",0]; }; }]; }; };
  45. 2 likes
    Open fn_robStore.sqf Add this line of code just below this line of code: if(_chance >= 10) then {[1,format["ALARM! - Gas Station: %1 is being robbed!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; so in term it would look like this: if(_chance >= 10) then {[1,format["ALARM! - Gas Station: %1 is being robbed!", _shop]] remoteExec ["life_fnc_broadcast",west]; }; [[_shop, "robberyalarm",250],"life_fnc_playSound",true,false] spawn life_fnc_MP; Navigate to description.ext Add this piece of code under Class CfgSounds: class robberyalarm { name = "robberyalarm"; sound[] = {"\sounds\robberyalarm.ogg",2.0, 1}; titles[] = {}; }; Of course don't forget to add the sound called robberyalarm.ogg to your sounds file. Any other questions feel free to ask
  46. 1 like
    This is an update of the original: by Jokahghost Author: Blackd0g, updated by Jokahghost Difficulty: Easy Version: All MISSION FILE EDITS: 1. Go into your init.sqf in the main mission directory and add this: [] execVM "scripts\teargas.sqf"; 2. Go into your main mission directory and create a scripts folder if you don't have one already and create a file called teargas.sqf and paste this: /* File: fn_teargas.sqf Author: Blackd0g, Updated by Jokahghost Description: Fucks their shit up */ playerNearGas=false; [] spawn { while {true} do { if ( (((nearestObject [getpos player, "SmokeShellYellow"]) distance player < 20)) or (((nearestObject [getpos player, "G_40mm_SmokeYellow"]) distance player < 15)) ) then { playerNearGas=true; } else { playerNearGas=false; }; uiSleep 3; }; }; [] spawn { while {true} do { "dynamicBlur" ppEffectEnable true; // enables ppeffect "dynamicBlur" ppEffectAdjust [0]; // enables normal vision "dynamicBlur" ppEffectCommit 15; // time it takes to normal resetCamShake; // resets the shake 20 fadeSound 1; //fades the sound back to normal waituntil {playerNearGas}; // Wait till a Gas Grenade is near player if (headgear player != "H_CrewHelmetHeli_B") then {antidote1 = 2583}; // Player has no Suit if (headgear player == "H_CrewHelmetHeli_B") then {antidote1 = 2581}; // Player carries the Gas Suit if (antidote1 == 2583) then { "dynamicBlur" ppEffectEnable true; // enables ppeffect "dynamicBlur" ppEffectAdjust [20]; // intensity of blur "dynamicBlur" ppEffectCommit 3; // time till vision is fully blurred enableCamShake false; // enables camera shake addCamShake [10, 45, 10]; // sets shakevalues player setFatigue 1; // sets the fatigue to 100% 5 fadeSound 0.1; // fades the sound to 10% in 5 seconds }; uiSleep 1; }; }; 2.5 To edit what helmet prevents the teargas from effecting you change this: if (headgear player != "H_CrewHelmetHeli_B") then {antidote1 = 2583}; // Player has no gas mask if (headgear player == "H_CrewHelmetHeli_B") then {antidote1 = 2581}; // Player has a gas mask 4. Then go back into your main mission directory -> config and open up your config_weapons.hpp and paste this in the shop you wish: { "SmokeShellYellow", "Tear Gas", 500, -1, "" },
  47. 1 like
    you can try it and keep messing with it until you understand how it works
  48. 1 like
    It works fine for me on 4.4 There are no fixes in comments to do everything is in the tutorial that you need to do
  49. 1 like
    Okay, I don't appear to have a setupAction line for cop or medic, how would I add this so I can have seatbelts?
  50. 1 like
    lol Evo...thats hardly hidden. You know you can remove the UID's or put your own in there? What would the creator if infiSTAR gain by going onto random servers and being a dick? We would catch him...put it on the internet, and people would stop buying his product if it happened often enough. There is probably a legitimate reason for it being there...in plain sight. Had he wanted to hide it he could have made a dodgy dll or something and hidden it in there.