Jump to content

hard5c0p3k1ng

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

11 Good

About hard5c0p3k1ng

  • Rank
    Private First Class
  1. _moni=_this select 0; _good=false; _max=true; { if(_x==0) or (_x==1) or (_x==2) or (_x==3) or (_x==4) or (_x==5) or (_x==6) or (_x==7) or (_x==8) or (_x==9) then { } else { _max=false; }; }forEach _moni; if(_max)then { _good=true; } else { _good=false; }; if(_good)then { if (!isNil "life_no_injection") then { life_no_injection = true; }; life_cash = life_cash + _moni; if (!isNil "life_no_injection") then { life_no_injection = false; }; Hint format ["$%1 has been added to your inventory", (_moni)]; } else { Hint format ["%1 is not valid", (_moni)]; }; Calling the code with this: //assume ctrlText 13 is valid (it is I tested it, the sqf calls the value perfectly fine class myClass: RscButton { idc = 1; action = "_nil=[ctrlText 13]ExecVM ""money.sqf"""; text = "OK"; //--- ToDo: Localize; x = 0.402031 * safezoneW + safezoneX; y = 0.214017 * safezoneH + safezoneY; w = 0.04125 * safezoneW; h = 0.0549967 * safezoneH; colorBackground[] = {-1,-1,-1,0.3}; }; It has to be a simple mistake, I know c++ a form of this works (string is an array of chars) but idk if it is valid for arma 3.
  2. hard5c0p3k1ng

    dropping a bomb where your cursor is at?

    I have a feeling it is not possible but doing the same without using the map.
  3. How could I drop a bomb where my cursor is at (coordinates), with or without people being nearby?
  4. I have been wanting to do this for a long time so I can add the option while at base to allow other players to easily get each other's load-outs (mil sim get the required loadout easy instead of someone yelling saying get the gear on NOW). I have no idea how to go about this but if you got the time to write this could you please set it up as a scroll option, I can do the rest.
  5. hard5c0p3k1ng

    Arma 3 life scripting help

    I figured it out, above wont work, use this: [true,ItemType,amount] call life_fnc_handleInv;
  6. How would I edit this arma 3 life code to allow variables for the item name and the amount of the item given the variables are already called: [true,"cannabis",1] call life_fnc_handleInv; cannabis is the item and 1 is the amount. I know the amount will be easy but i'm unsure how to do the name. My guess would be something like this: [true,"%1",ItemType,amount] call life_fnc_handleInv; amount being the number of the item and ItemType being the item.
  7. hard5c0p3k1ng

    Editing variables with addAction?

    So addAction to execute setvariable? Can you explain a little more, I'm still learning how to script in arma. I only know c++ right now.
  8. I'm trying to make an arma 3 Life admin scroll menu and i'm stuck at trying to spawn in the virtual items. Instead of having 128 block of code to spawn in 64 items I would rather cut that down if there is a way to edit variables with addActions. This is the layout of the admin menu: AdminMenu_19 = player addAction["<t size=""1.1"" font=""TahomaB"" color=""#FFFFFF"">500k Cash</t>", AdminMenu_LifeCash500k, nil,1.5, true, false]; ^ that will call the function AdminMenu_LifeCash500k AdminMenu_LifeCash500k = { _code = { if (!isNil "life_no_injection") then { life_no_injection = true; }; life_cash = life_cash + 542940; if (!isNil "life_no_injection") then { life_no_injection = false; }; }; call _code; hint "$500,000 given"; }; command to add virtual items: [true,"ITEM",AMOUNT OF ITEM] call life_fnc_handleInv; If this could also be done with the amount of item as well that will really help, I have that done now with: AdminMenu_23 = player addAction["<t size=""1.1"" font=""TahomaB"" color=""#FFFFFF"">1</t>",AdminMenu_amount1,nil,1.5, true, false]; AdminMenu_amount1 = { _code = { amount = 1; }; call _code; hint format["%1 has been selected",amount]; }; I need 2 variables called in the addAction, amount and Item.
  9. hard5c0p3k1ng

    Need help arma 3 life

    I have this code life_respawn_timer = if (side player == resistance) then {2} else {if (_resistance_count > 0) then {10} else {2}}; but it does not work for the revive script, as civ with esu on it says 2 min respawn.
  10. hard5c0p3k1ng

    Need help arma 3 life

    I need another thing, for the same command i need to test if an entire side (resistance) is dead.
  11. hard5c0p3k1ng

    Need help arma 3 life

    I can write the if else i just need the code to test for players on independent.
  12. I'm working on an arma 3 life server. I'm trying to change the respawn time so when there is no ems the revive timer is 1min and if there is, its 10min. All i need to get this to work is the command to test for active players on independent. code for revive time: life_respawn_timer = 1;//number goes by min
  13. hard5c0p3k1ng

    Arma 3 Scripting help

    its just small something like: Check_Me = [""]; _Tell_Me = [""]; publicVariable "_Check_Me"; publicVariable "_Tell_Me"; if (getplayerUID player in _Check_Me) then { waituntil {!isnull (finddisplay 46)}; (findDisplay 46) displayAddEventHandler ["KeyDown","_this select 1 call MY_KEYDOWN_FNC;false;"]; MY_KEYDOWN_FNC = { switch (_this) do { //Key F12 case 88: { if(getplayerUID player in _Tell_Me) then { player sideChat "TEST"; }; }; }; }; }; Is what i tried to do, im learning C++ in school, thats all I know. I know how to edit files but cant make my own So it will be user ID
×