Jump to content

Hooty

Member
  • Posts

    432
  • Joined

  • Last visited

  • Days Won

    4

Reputation Activity

  1. Like
    Hooty reacted to Bricktop in How to get vehicles to spawn damaged ?   
    These work for me - Just drop in your mission\init.sqf with the other variables:
    Set to what ever % you want -
    DynamicVehicleDamageLow = 0; // Min damage random vehicles can spawn with
    DynamicVehicleDamageHigh = 100; // Max damage random vehicles can spawn with
    DynamicVehicleFuelLow = 0; // Min fuel random vehicles can spawn with
    DynamicVehicleFuelHigh = 100; // Max fuel random vehicles can spawn with
  2. Like
    Hooty reacted to Jestertriks in [Release] Safe zone vehicle management - 1.0.6   
    Thank you @Hooty. That's exactly what I was confused about because they created theyre own files. I loved GTX till they took the .dll editing away and limited access to the database. Survival servers are not the greatest with support but eventually they get to answering you. GTX use to answer with-in 1-2 minutes, it was amazing for when the server box went down or I got ddossed or some crap like that. it sucks waiting a day or more for survival servers. I cant wait till I grasp more of the scripting and move on to my own box or rent one from OVH
     
    thanks a lot for your time
  3. Like
    Hooty reacted to juandayz in [RELEASE] Custom GUI / Menu UPDATED for 1061   
    @theduke  you still the duke of hpp menus
  4. Like
    Hooty reacted to theduke in [Outdated][RELEASE] Virtual Garage update for 1061   
    @Hooty
    Alright so the ANY/weapons and not taking your coins is fixed.  
    Open your compiles.sqf and add this at the bottom
    SC_fnc_removeCoins= { private ["_player","_amount","_wealth","_newwealth", "_result"]; _player = _this select 0; _amount = _this select 1; _result = false; _wealth = _player getVariable["cashMoney",0]; if(_amount > 0)then{ if (_wealth < _amount) then { _result = false; } else { _newwealth = _wealth - _amount; _player setVariable["cashMoney",_newwealth, true]; _player setVariable ["moneychanged",1,true]; _result = true; PVDZ_plr_Save = [_player,(magazines _player),true,true] ; publicVariableServer "PVDZ_plr_Save"; }; }else{ _result = true; }; _result }; SC_fnc_addCoins = { private ["_player","_amount","_wealth","_newwealth", "_result"]; _player = _this select 0; _amount = _this select 1; _result = false; _wealth = _player getVariable["cashMoney",0]; _player setVariable["cashMoney",_wealth + _amount, true]; PVDZ_plr_Save = [_player,(magazines _player),true,true] ; publicVariableServer "PVDZ_plr_Save"; _player setVariable ["moneychanged",1,true]; _newwealth = _player getVariable["cashMoney",0]; if (_newwealth >= _wealth) then { _result = true; }; _result }; vehicle_gear_count = { private["_counter"]; _counter = 0; { _counter = _counter + _x; } count _this; _counter }; OP has been updated with instructions.
    I would suggest anyone that has downloaded the files before this post to do the fix also
    To Note. The SC_fnc_addCoins block is not needed for this script, but some 1051 scripts use that variable. won't hurt to add it.
  5. Like
    Hooty reacted to theduke in [Outdated][RELEASE] Virtual Garage update for 1061   
    yeah that never even crossed my mind. Ill fix that with the current  currency variable
  6. Like
    Hooty got a reaction from theduke in Odd error putting in custom buildings   
    Try this.
    Put your new buildings file in a custom folder "name it whatever" in the dayz sever not the mission.
    Call it in your sever_functions.sqf at the very bottom located in dayz_server\init
    edit the top and bottom lines of your edited files so that they look like this
    at the bottom
    to call in you server_functions.sqf add at the very bottom
     
    pm me if you have any problems 
  7. Like
    Hooty reacted to theduke in [RELEASE] Custom GUI / Menu UPDATED for 1061   
    Hi Epoch community,
    Have you ever wanted a way for players to be able to see your server rules while in-game?
    Are you tired of repeating yourself with simple answers to simple questions?
    Looking for a different way to deploy items or call certain scripts?
    Our community uses mostly scripts from this awesome epoch community. Its our time to give back :)
    I've decided to make a release version of my GUI for everyone to use.
    https://github.com/theduke77/Custom-Menu
    In the video, i have my community colors in the GUI, the release version I tried to match the zupa colors.
    Video
    I've received tremendous help from SHIX. Most of the credit goes to him for explaining to me how to do this.
    also, I've used the code he provided as a template and built this from that.
    He kindly allowed me to share with all of you
    Ok, now for the fun part.
    This is NOT for someone new to the world of epoch server management. (probly because of my instructions lol)
    This is NOT a plug-n-play addon. You must configure all the files and customize the menu
    I would strongly suggest you have a test server to be able to test it as you create new pages.
    Try one page to make sure it looks good, then go from there.
    If you want to change the colors of stuff, check out the options section before creating pages.
    I will do my best to explain to the best of my knowledge.
    I'm far from being a coder lol
    Tools required
    Notepad ++
    PBO Tool
    patience...with my instructions ;)
    TextView (optional)
    Installation:
    How to create new pages
    OPTIONAL
    Known issues
    Many thanks to SHIX. Without him explaining this GUI stuff to me I wouldn't of made it lol
    Thanks to Kill Zone kids blogs, they are amazing to learn from.
    Thanks casual_jeff for the 1061 fix
    Hope you guys enjoy it.
    I will support this to the best of my knowledge :)
     
    Added keyboard.sqf for less confusion.  Thanks @RC_Robio
    Also added instructions on how to change button to open the menu
    Now with a github link also. Thanks @salival
     
  8. Like
    Hooty reacted to theduke in Vehicle God Mode in Plot Pole for 1061?   
    the file names have changed. so in the compiles you must comment out the "new" line.
    I have yet to get it working, but i havn't messed around with it long enough.
    the new filename is called veh_handleDam.sqf and not vehicle_handleDamage.sqf like the 1051 version.
    Ill try again later tongiht
     
  9. Like
    Hooty reacted to JasonTM in [Outdated] ZSC for Epoch 1.0.6.2 (And OverWatch 0.25)   
    That was just something that Zupa put in there originally. You can change those lines or delete them if you want.
  10. Like
  11. Like
    Hooty reacted to salival in [Outdated] ZSC for Epoch 1.0.6.2 (And OverWatch 0.25)   
    What's funny is when you're debugging something and reloading the server over and over again trying to figure out why it's not working, then you realise you haven't packed the mission file in 30 minutes
    zzzz
  12. Like
    Hooty got a reaction from RammerJammer in High Loot Table Epoch 1.0.6   
    Its really easy to edit yourself. If you need help pm me.
  13. Like
    Hooty reacted to theduke in [Outdated][RELEASE] Virtual Garage update for 1061   
    Alright so here is the virtual garage.
    ALL CREDITS go to the original authors.
    GZA David for the Virtual Garage script
    Torndeco for the EXT Database
    All i did was change a few variables to update it for 1.0.6.1
     
    DOWNLOAD
    https://github.com/theduke77/Virtual-Garage
    I use the script a little different than intended.
    The only difference, i use vehicle and air traders to access the virtual garage, intended for use with garages, but requires gem crafting...
    The original instructions are in the download in case someone wants to do it that way
    so on with the instructions..
    Tools Required
    Notepad ++
    PBO Tool
    SQL tool such as HeidiSQL
    First we start with the mission folder.
    copy the scripts folder from the downloads into your mission folder.
    1. Open your init.sqf
    look for
    dayz_randomMaxFuelAmount add this bellow
    DZE_garagist = ["Profiteer4","Worker3","RU_Profiteer4","Hooker1","Worker2"]; save and close
    2. Open your description.ext
    add this at the bottom
    #include "scripts\garage\common.hpp" #include "scripts\garage\vehicle_garage.hpp" save and close
    4. Open your fn_selfactions.sqf
    look for
    //Player Deaths add this above
    //Garage if((_typeOfCursorTarget in DZE_garagist) && (player distance _cursorTarget < 5)) then { if (s_garage_dialog2 < 0) then { s_garage_dialog2 = player addAction ["Vehicle Garage", "scripts\garage\vehicle_dialog.sqf",_cursorTarget, 3, true, true, "", ""]; }; if (s_garage_dialog < 0) then { s_garage_dialog = player addAction ["Store Vehicle in Garage", "scripts\garage\vehicle_store_list.sqf",_cursorTarget, 3, true, true, "", ""]; }; } else { player removeAction s_garage_dialog2; s_garage_dialog2 = -1; player removeAction s_garage_dialog; s_garage_dialog = -1; }; still in the fn_selfactions.sqf
    look for
    player removeAction s_player_fuelauto2; s_player_fuelauto2 = -1; player removeAction s_player_manageDoor; s_player_manageDoor = -1; add this bellow
    player removeAction s_garage_dialog2; s_garage_dialog2 = -1; player removeAction s_garage_dialog; s_garage_dialog = -1; save and close.
    5. Open your variables.sqf
    look for dayz_resetSelfActions = {
    add this before the closing bracket     };
    s_garage_dialog = -1; s_garage_dialog2 = -1; save and close
     
    6. Open your compiles.sqf
    look for
    fn_dropItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_dropItem.sqf"; add this above
    player_getVehicle = compile preprocessFileLineNumbers "scripts\garage\getvehicle.sqf"; player_storeVehicle = compile preprocessFileLineNumbers "scripts\garage\player_storeVehicle.sqf"; vehicle_info = compile preprocessFileLineNumbers "scripts\garage\vehicle_info.sqf"; Still in the compiles, add this at the bottom
    SC_fnc_removeCoins= { private ["_player","_amount","_wealth","_newwealth", "_result"]; _player = _this select 0; _amount = _this select 1; _result = false; _wealth = _player getVariable[Z_MoneyVariable,0]; if(_amount > 0)then{ if (_wealth < _amount) then { _result = false; } else { _newwealth = _wealth - _amount; _player setVariable[Z_MoneyVariable,_newwealth, true]; _player setVariable ["moneychanged",1,true]; _result = true; call player_forceSave; }; }else{ _result = true; }; _result }; SC_fnc_addCoins = { private ["_player","_amount","_wealth","_newwealth", "_result"]; _player = _this select 0; _amount = _this select 1; _result = false; _wealth = _player getVariable[Z_MoneyVariable,0]; _player setVariable[Z_MoneyVariable,_wealth + _amount, true]; call player_forceSave; _player setVariable ["moneychanged",1,true]; _newwealth = _player getVariable[Z_MoneyVariable,0]; if (_newwealth >= _wealth) then { _result = true; }; _result }; vehicle_gear_count = { private["_counter"]; _counter = 0; { _counter = _counter + _x; } count _this; _counter }; save and close
    7A. Open your publicEH.sqf
    If you don't have a custom publicEH.sqf already, go to step 7B
    look for
    if (dayz_groupSystem) then { "PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) spawn server_updateGroup}; }; add this bellow
    "PVDZE_queryGarageVehicle" addPublicVariableEventHandler {(_this select 1) spawn server_queryGarageVehicle};
        "PVDZE_spawnVehicle" addPublicVariableEventHandler {(_this select 1) spawn server_spawnVehicle};
        "PVDZE_storeVehicle" addPublicVariableEventHandler {(_this select 1) spawn server_storeVehicle};
    7B. Only do this step if you DON'T have a custom publicEH.sqf
    Open your init.sqf again
    look for
    call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\publicEH.sqf"; replace it with this
    call compile preprocessFileLineNumbers "scripts\garage\publicEH.sqf"; Thats it for the mission file
     
    Now for the server 
    Copy the garage folder from the download, into the compiles folder in your dayz_server folder
    1. Open your server_functions.sqf
    look for this
    spawn_vehicles = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\spawn_vehicles.sqf"; add this bellow
    "extDB" callExtension "9:DATABASE:Database2"; "extDB" callExtension format["9:ADD:DB_RAW_V2:%1",1]; "extDB" callExtension "9:LOCK"; server_queryGarageVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\server_queryGarageVehicle.sqf"; server_spawnVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\server_spawnVehicle.sqf"; server_storeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\server_storeVehicle.sqf"; fn_asyncCall = compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\garage\fn_async.sqf"; Save and close
    Thats it for the server PBO
     
     
    BattlEye
    Add to publicvariable.txt:
    !="PVDZE_queryGarageVehicle" !="PVDZE_storeVehicle" !="PVDZE_spawnVehicle" 
     
    Infistar
    Infistar: 
    Add to _ALLOWED_Dialogs:
    2800,3800
     
    Now for the database
    Using heidi (or your favorite sql tool)
    Open SQL.txt and copy everything in there and run a query on your database.
    This will create a database called extdb
    Copy the @extdb folder to the root of your server.
    In your server launch BAT. add @extdb; before @dayz_epoch_server
    Open the @extdb folder, edit the extdb-conf.ini and change the username and password to suit your needs.
    (you might need to give all permissions for that user for the new database in heidi)
     
    All done.  Log in and go visit your vehicle traders!
    Cheers Enjoy!
     
    EDIT: updated the instructions for the fix of ANY/gear and it not taking coins. Please refer to step 6
    EDIT 22/03/2017 : Added a fix for client RPT error (Step 5) Also changed the variable for the currency
  14. Like
    Hooty reacted to killerkiwi in Battlefield 1.5   
    if you don't like my work don't say any thing at all ---------->EASY<-----------

    if any bugs or errors you come a cross please mp me i fix them soon as i can 
    please note this mission has overwatch loot in it just remove the class names
    step 1
    got to mp MPMissions\DayZ_Epoch_11.Chernarus\mission.sqm  
    add this in mission.sqm
     
            class Item29 // may need to change this 
            {
                position[]={7154.51,0.00146484,9674.14};
                name="Battlefield";
                text="Battle field";
                type="Defend";
                colorName="ColorRed";
            };
     
     step 2.  paste this code in the Battlefield  v1.0 file and your done...... 
     if you don't  have battlefiled v1.0  use this  directory....  
    execVM "\z\addons\dayz_server\Battlefield.sqf";  // add this to the bottom of server_functions.sqf in the server pbo
     
    old loot box 
     http://pastebin.com/7Uybz0BC
    new lot box updated by linux  give him a like http://epochmod.com/forum/profile/31572-linux/
    http://pastebin.com/xzXjKpJw  
     
     

     
  15. Like
    Hooty reacted to ElDubya in Server Wipe sql   
    Open your database and truncate the "Object Data" table. This will delete every item on your server, buildables, vehicles ... everything. Players will still have whatever they have on them when they log out. All mods will still work exactly the same.
  16. Like
    Hooty reacted to BigEgg in Strange server fps/affinity behaviour   
    Arma 2 is optimized for 1 core.
  17. Like
    Hooty reacted to juandayz in +[Release]+[Alchemy Lab]   
    NICE!ªª  @Bricktop , thers no problem everybody is free to edit and make better my work :)  and if u wanna share ure remake please do it! :)
  18. Like
    Hooty reacted to Indiculous in [HOW TO] Watermark on the bottom left of screen   
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    NOTICE: I do not take credit for these scripts im simply just sharing them with a tutorial!
     
    1) Watermark :
    In your Mission file open your init.sqf and add this at the very bottom
     
    //DayZ Watermark if (!isNil "server_name") then { [] spawn { waitUntil {(!isNull Player) and (alive Player) and (player == player)}; waituntil {!(isNull (findDisplay 46))}; 5 cutRsc ["wm_disp","PLAIN"]; ((uiNamespace getVariable "wm_disp") displayCtrl 1) ctrlSetText server_name; }; }; Next open your description.ext and add this to the very bottom   // DayZ Watermark class RscTitles { class wm_disp { idd = -1; onLoad = "uiNamespace setVariable ['wm_disp', _this select 0]"; fadein = 0; fadeout = 0; duration = 10e10; controlsBackground[] = {}; objects[] = {}; class controls { class wm_text2 { idc = 1; x = safeZoneX+0.027;//safeZoneW*0.01; y = safeZoneY+safeZoneH-0.16; w = 1.151*safeZoneH; h = 0.057*safeZoneH; shadow = 2; class Attributes { font = "EtelkaNarrowMediumPro"; color = "#24FFFFFF"; align = "left"; // put "center" here if you want some background valign = "middle"; shadow = 2; }; colorBackground[] = { 1, 0.3, 0, 0 };  // uncomment and increase 4th number to have a background font = "EtelkaNarrowMediumPro"; size = 0.06*safeZoneH; type = 13; style = 0; text=""; }; }; }; }; Then open you init again and Find This Line    dayz_previousID = 0;   Directly under that add     server_name = "Servername";   So it should look like this    dayz_previousID = 0; server_name = "Servername";   Your done now go in game and at the bottom left you will see your watermark!   -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  19. Like
    Hooty reacted to theduke in [RELEASE] Custom GUI / Menu   
    Hi Epoch community,
    Have you ever wanted a way for players to be able to see your server rules while in-game?
    Are you tired of repeating yourself with simple answers to simple questions?
    Looking for a different way to deploy items or call certain scripts?
    Our community uses mostly scripts from this awesome epoch community. Its our time to give back :)
    I've decided to make a release version of my GUI for everyone to use.
    Download UPDATED FOR 1061: https://github.com/theduke77/Custom-Menu
    Or follow this link
    https://epochmod.com/forum/topic/43462-release-custom-gui-menu-updated-for-1061/In the video, i have my community colors in the GUI, the release version I tried to match the zupa colors.
     
    Video
    I've received tremendous help from SHIX. Most of the credit goes to him for explaining to me how to do this.
    also, I've used the code he provided as a template and built this from that.
    He kindly allowed me to share with all of you
    Ok, now for the fun part.
    This is NOT for someone new to the world of epoch server management. (probly because of my instructions lol)
    This is NOT a plug-n-play addon. You must configure all the files and customize the menu
    I would strongly suggest you have a test server to be able to test it as you create new pages.
    Try one page to make sure it looks good, then go from there.
    If you want to change the colors of stuff, check out the options section before creating pages.
    I will do my best to explain to the best of my knowledge.
    I'm far from being a coder lol
    Tools required
    Notepad ++
    PBO Tool
    patience...with my instructions ;)
    TextView (optional)
    Installation:
    How to create new pages
     
    OPTIONAL
    Known issues
    Many thanks to SHIX. Without him explaining this GUI stuff to me I wouldn't of made it lol
    Thanks to Kill Zone kids blogs, they are amazing to learn from.
    Hope you guys enjoy it.
    I will support this to the best of my knowledge :)
     
    16/02/2017 UPDATE
    Thank you to @Casual_Jeff for this 1.0.6 FIX
     
  20. Like
    Hooty reacted to Tang0 in DZMS for AI fortress??   
    Hooty let me know if you get the static guns working in dzms, been working on it myself but never finished it, got mines to work though
  21. Like
    Hooty got a reaction from juandayz in Bombguy suicide   
    Lol to funny. I like it.
     
  22. Like
    Hooty reacted to juandayz in Bombguy suicide   
    a lil adaptation of known suicide script.   player explode.
    suicide.sqf
     
  23. Like
    Hooty reacted to juandayz in [VERY BASIC GUIDE] TO MAKE A NEW SCRIPT   
    A very basic guide to make your own script:
     
    Feel free to complete this guide :)
    1-IN CASE U NEED ADD ONE ITEMS REQUIRED (only one)
    2-IN CASE U NEED ADD A ITEMS REQUIRED (more than one)
     
     
    *Now into the same script you will need check if this player have the item variable so:
    if (_hasitem) then { }; so the script can be:
    *Now at very top its time to define the private variables for this script so:
    private = ["name of variable","name of variable"];
    private = ["_hasitem"]; So at this time the script looks like:
    2-REMOVING ITEMS
    Here you will see how to remove more than 1 item: (   remember for remove only one item you can use player removeMagazine "FoodchickenCooked";  )
    item requiered:
    _hasitem = [["cinder_wall_kit",2], ["ItemWoodFloor",3]] call player_checkItems;
    to remove this items use:
    _remove = [["cinder_wall_kit",2],["ItemWoodFloor",3]] call player_removeItems; So now the whole script looks:
    Thers other way to say "you dont have the item required" see:
    if (!_hasitem) exitWith {cutText [format["You will need 2xcinder_wall_kit and 3xItemWoodFloor"], "PLAIN DOWN"];}; ***Note: the ! before the variable means  NOT   . So here the code say:  if player Dont Have (_hasitem) exitWith {};
    so now the script looks:
    3-ADD A TIME RESTRICTION TO USE THE SCRIPT AGAIN
    Now whats about if u wanna put a time restriction to execute the script?
    well heres the structure:
    if(_Time < _LastUsedTime) exitWith { cutText [format["wait %1 seconds !",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; }; But you need define what means _Time & _LastUsedTime variables  and need put where start to count.  So:
    _LastUsedTime = 1200;//time in seconds before use again the script
    _Time = time - lastuse; //"lastuse" is where you start to count and is equal to time so you need to put it immediately after the _hasitem variable is checked as fine...
     
    see:
    if (_hasitem) then { lastuse = time; }; Well now the whole script looks:
    4-USING RANDOMS
    Now you wanna put a random events into the script. You can use two ways:
    First:
    _randomCases = round(random(2)); switch (_randomCases) do { case 0 :{ //what happend here? }; case 1 :{ //what happend here? }; }; Or the other way:
    _randomNumbers = floor(random 100);//you can use any other number 100,200,50 if (_randomNumbers <= 30) then { //if randomNumbers is less or equal to 30 then //what happend here? }; if (_randomNumbers <= 100 && _randomNumbers > 31) then { //if randomNumbers is into 31 to 100 then //what happend here? }; So for the first example the whole script looks:
    And for the second example looks:
    5-ADD A TOOL REQUIRED
    _inventory = items player; _hastools = "ItemToolbox" in _inventory; if !(_hastools) exitWith { cutText [format["Must be equiped with 1x toolbox in your toolbet."], "PLAIN DOWN"];}; if (_hastools) then { }; So now the script looks:
    6-Allow The script only if player is an hero
    Now you want procced with the script only if player is an hero.. so:
    _PlayerHumanity = (player getVariable"humanity"); if (_PlayerHumanity < 5000) exitWith { cutText [format["Need be a hero"], "PLAIN DOWN"];}; if (_PlayerHumanity > 5000) then { }; So the whole script now is:
    7-ADD A COIN COST
    Whats about if u wanna put a coins cost to execute it?
    _costs = 200; if !([ player,_costs] call SC_fnc_removeCoins) then { titleText [format["Needs %1 %2.",_costs,CurrencyName] , "PLAIN DOWN", 1]; } else { titleText [format["Pay %1 %2 for this",_costs,CurrencyName] , "PLAIN DOWN", 1]; }; So now script looks:
    8-Nearest Required
    Now a nearest required from an objet or AI.
    _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["TK_CIV_Woman01_EP1"], 4] > 0; //TK_CIV_Woman01_EP1 is an AI id if (_nearestRestriction) then { }; you can use it  to execute scripts only into plot area...
    for example:
    _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 30] > 0; if (_nearestRestriction) then { }; or to restrict if is present
    for example if is a plot pole in the area you cant execute the script
    _playerPos = getPosATL player; _nearestRestriction = count nearestObjects [_playerPos, ["Plastic_Pole_EP1_DZ"], 30] > 0; if (_nearestRestriction) exitWith { cutText [format["Not in plot area"], "PLAIN DOWN"];}; }; So now the script is:
    in negative case.. (if u cannot execute the script if the objet plot area is present then the script must be):

    9-Give something to the player
    here you can use:
    player addMagazine "item id"; so for example if u wanna give gold money then:
    player addMagazine "ItemBriefcase100oz"; if u wanna give coins money then:
    _add = [player, 1000] call SC_fnc_addCoins; if u wanna give a random item then:
    _add = ["ItemSodaOrangeSherbet","HandGrenade_west","ItemSodaEmpty"] call BIS_fnc_selectRandom; player addMagazine _add;  
    So for the 1st example script looks: (give gold)
    for the 2nd example looks: (give coins)
    for the 3rd example (give random item)
    10-Create a small function
    Now you need use random events and repeat a large or medium secuence.. to not write twice.. use a small functiion.. see:
    ///Function function_spawncrate = { _cratemodels=["USBasicWeapons_EP1","LocalBasicAmmunitionBox"] call BIS_fnc_selectRandom; _variete = ["ItemSodaOrangeSherbet","HandGrenade_west"] call BIS_fnc_selectRandom; _stone = ["CinderBlocks","MortarBucket","PartOreSilver"] call BIS_fnc_selectRandom; _wood = ["PartPlywoodPack","PartWoodPile","PartWoodLumber"] call BIS_fnc_selectRandom; _farm = ["FoodchickenRaw","FoodCanCorn","FoodrabbitRaw","ItemKiloHemp","FoodCanCurgon"] call BIS_fnc_selectRandom; _aiweapon = ["M16A2","M4A1"] call BIS_fnc_selectRandom; _crate1 = objNull; if (true) then{ _this = createVehicle [_cratemodels, [8352.9189, 5950.7417, -3.0517578e-005], [], 0, "CAN_COLLIDE"]; _crate1 = _this; clearWeaponCargoGlobal _crate1; clearMagazineCargoGlobal _crate1; _crate1 addWeaponCargoGlobal [_aiweapon, 1]; _crate1 addmagazinecargoglobal [_variete, 2]; _crate1 addmagazinecargoglobal [_wood, 5]; _crate1 addmagazinecargoglobal [_stone, 3]; _crate1 addmagazinecargoglobal [_farm, 3]; _crate1 setVariable ["permaLoot",true]; }; sleep 400; deleteVehicle _crate1; }; ////////////////////////////////END FUINCTON  
    script looks:
    other way is call an external script into main script see:
    [] execVM 'path\to\external\script.sqf'; so the variant to not make the small function as above is call this external.sqf 
    your main.sqf
    and you can put into external.sqf same codes as function_spawncrate
    external.sqf
    11-Some "Commands"
    sleep  ( you can use it to leave in "stand by" your script for some seconds )
    example: ( wait 40 seconds and proceed to delete a crate called _crate1 )
    sleep 40; deleteVehicle _crate1; also you can use a variable to define the time and make wait the variable with sleep command:
    _wait_time = 40; sleep _wait_time; deleteVehicle _crate1; Other way to let the script in "stand by" is use waitUntil command.
    for example wait for nearest player from an objet:
    _distance = 10; waitUntil {(player distance _xobjet) < _distance}; //proceed with the rest of the script so with waitUntil also you can wait to complete some conditions as above, where script wait for player 10 mts near the _xobjet
     
    removeAllWeapons player;  //leave a player without weapons
    removeBackpack player;  //without backpack
    {player removeMagazine _x} forEach magazines player;  //without items
    player setVariable['USEC_BloodQty',12000,true]; //set blood amount on player
    r_player_infected = true; //infect player
    [player,-100] call player_humanityChange;//modify humanity of the player
    12-Count amount of item _
    Now you need count how many items had this player in his inventory, to stop giving same item for example if thers more than 2
    _bloodbagAmount = {_x == "ItemBloodbag"} count magazines player; if (_bloodbagAmount > 2) exitWith { cutText [format["WARNING: %1, YOure Full of bloodbags", name player], "PLAIN DOWN"]; }; 13-Leave the script if player is in combat
    if (dayz_combat == 1) exitWith { cutText [format["IN COMBAT."], "PLAIN DOWN"]; }; 14-Attach to
    _player = player;//create a _player variable _mark = "RoadFlare" createVehicle getPosATL _player;//create a roadflare called _mark with the same location of _player _mark attachTo [_player, [0,0,0]];//attach _mark to _player with 0/0/0 axis values In this case we create a "RoadFlare" in the _player position and proceed to attach it with the player
  24. Like
    Hooty got a reaction from juandayz in BaseBattle / PvP HotSpot   
    I got them all fixed thanks. Love it! I have noticed that my markers dont refresh, and if using a debug monitor the message only shows for a split second.
    So I changed the messages to this, they work perfect now.
     
  25. Like
    Hooty got a reaction from Shak in BaseBattle / PvP HotSpot   
    I got them all fixed thanks. Love it! I have noticed that my markers dont refresh, and if using a debug monitor the message only shows for a split second.
    So I changed the messages to this, they work perfect now.
     
×
×
  • Create New...