Jump to content

chrisyou

Member
  • Content Count

    20
  • Joined

  • Last visited

  • Medals

Posts posted by chrisyou


  1. Heya guys.

    Ive got 19 units placed in my mp mission.

    I wanna count how many of them are used..

    I am not exactly new to scripting but this bothered me for quite some time..

    west countSide allUnits returns 19.

    west countSide playableUnits returns 18.

    How do I count how many of them are ACTUALLY played?

    Thanks a lot guys.. If you need me to explain my situation a little further, go ahead and ask. :)

    Best Regards

    chrisyou


  2. The code I have in our build which yours look very similar to, if not the exact same works! You need to learn where to put it, I am not going to let you know that because the more you learn how the code is structured the more chance you have to give something back to the community.

    Wouldn't this be the perfect chance for you to give something back to the community? :p

    I've also helped quite a few people out with their scripts.


  3. Actually, that code works, as I have had it in our build for the past 4 weeks!

    What code do you mean? My uniform code unfortunately doesn't work :/

    This seems to be the problem most of the server admins have.


  4. Does anyone know how to create custom paycheck tiers for donators please help?

    Thanks!

    Example : $10 Donator Tier 1 = $10,000 Paychecks.

    Change the highlighted code of core\session\fn_sessionReceive.sqf

    switch(__GETC__(life_donator)) do

    {

    case 1: {life_paycheck = life_paycheck + 750;};

    case 2: {life_paycheck = life_paycheck + 1500;};

    case 3: {life_paycheck = life_paycheck + 2000;};

    };

    ______________________________________

    Could anyone check my code and tell me why this is not working for me?

    This is the fn_loadGear.sqf for cops.

    vB6Tnkh.png


  5. Does anyone know, how to fix this problem?

    Are there 100 slots usaable, if I configured them or not?

    The list is always shown 64 slots, not one more.

    Could more than 64 players connect or NOT?

    Add some playable units to the mission and set them as slots.

    __________________

    Does the donator gun store not work for anyone else?

    This is my donator part of weaponShopCfg:

    case "donator":
    {
    	switch(true) do
    	{
    		case (__GETC__(life_donator) == 0): {"no donator!"};
    		case (__GETC__(life_donator) == 1):
    		{
    			["donator: 1",
    				[
    					["hgun_Rook40_F",nil,30000],
    					["hgun_PDW2000_F",nil,50000],
    					["optic_ACO_grn_smg",nil,85000],
    					["ToolKit",nil,50],
    					["itemgps",nil,50],
    					["16Rnd_9x21_Mag",nil,25],
    					["30Rnd_9x21_Mag",nil,75]
    				]
    			];
    		};
    
    		case (__GETC__(life_donator) == 2):
    		{
    			["donator: 2",
    				[
    					["hgun_Rook40_F",nil,25000],
    					["hgun_PDW2000_F",nil,45000],
    					["arifle_MK20C_plain_F",nil,105000],
    					["optic_ACO_grn_smg",nil,80000],
    					["NVGoggles",nil,350],
    					["ToolKit",nil,50],
    					["itemgps",nil,50],
    					["16Rnd_9x21_Mag",nil,25],
    					["30Rnd_9x21_Mag",nil,75],
    					["30Rnd_556x45_Stanag",nil,125]
    				]
    			];
    		};
    
    		case (__GETC__(life_donator) >= 3):
    		{
    			["donator: 3 ",
    				[
    					["hgun_Rook40_F",nil,20000],
    					["hgun_PDW2000_F",nil,40000],
    					["hgun_pistol_heavy_01_F",nil,20000],
    					["arifle_Mk20C_plain_F",nil,100000],
    					["optic_ACO_grn_smg",nil,250000],
    					["optic_MRCO",nil,75000],
    					["NVGoggles",nil,350],
    					["ToolKit",nil,50],
    					["itemgps",nil,50],
    					["FirstAidKit",nil,25],
    					["16Rnd_9x21_Mag",nil,25],
    					["30Rnd_9x21_Mag",nil,75],
    					["11Rnd_45ACP_Mag",nil,85],
    					["30Rnd_556x45_Stanag",nil,125]
    				]
    			];
    		};
    	};
    };


  6. To give the hint for all in the helicopters:

    {If (_this local) hint "warning" } foreach in myhelicopter

    You could nest this by replacing myhelicopers with a foreach command. Then multiple helicopters will be adressed.

    For finding air units...just makeca script to check wether the unit is at 2m or above. You may be able to check the unit type with a command. But thats a matter of searching.

    Not sure what you mean by #3. You use anybody present? Maybe go for Bluefor present.

    I am using Civ present. It's just weird, if I use the same trigger in a blank mission file, it works. If I use it on my Altis Life Mission file, the trigger is sometimes already activated at spawn, sometimes won't activate.. It's just weird..


  7. Why not place some Anti Air units and make them shoot at the chopper when the chopper is inside the restricted area?

    Helps keeping the mission authentic.

    I'm afraid I can't use AA AI for this mission. :/

    My progess so far:

    outer trigger:

    hint "Warning";

    inner trigger:

    {_x setDamage 1} forEach thisList;

    (both on act, and both set to Activation: Civilian, present, repeat.)

    My concerns are:

    1. How do I only display the warning to those entering the zone?

    2. How do I only activate both triggers with air units without syncing or knowing the vehicle's name (I spawn them via script)?

    3. Why is the first trigger permanently activated? Does this have something to do with the empty objects, I placed within the radius?

    Thank you


  8. Checking this forum and using SEARCH function you can find this topic How this Restriction Zone Module works? started 03/07/2013

    BTW YOU CAN TRY THIS: (restriction module ain't very nice i prefeir to have not just a warning message but time left before to die also)

    place a trigger in the battle area

    name: Restriction_Zone_1

    activated by: anybody

    repeatedly

    present

    on condition field:

    !(vehicle player in thislist)

    on Activation field:

    SMNZoneRestrictionscript = [10] spawn SMN1279_fnc_restriction;

    where 10 is the time array before to die when you go outside the trigger, you can set as many seconds as you want

    on deactivation field:

    hint"";terminate SMNZoneRestrictionscript;

    in your

    init.sqf

    SMN1279_fnc_Restriction = compile preprocessFileLineNumbers "SMN_fnc_restriction.sqf";
    

    SMN_fnc_restriction.sqf

    _t = _this select 0;
    
    waitUntil 
    {
    	if(!alive player) exitwith {};
    	_text = format ["GET BACK OR YOU'LL DIE IN: %1 Seconds", _t];
    	hint _text;
    	sleep 1;
    	_t = _t - 1;
    
    _t == 0
    };
    
    if(!alive player) exitwith {};
    hint "YOU DESERTER!";
    
    
    sleep 3;
    
    titleCut ["","BLACK OUT", 1];
    
    cameraEffectEnableHUD false;
    showHUD false;
    enableSentences false;
    1 fadeRadio 0;
    1 fadeSound 0;
    1 fadeMusic 0;
    sleep 1;
    player addRating -10000;
    failMission "LOSER";
    

    FOR MP PvP

    same as above with the trigger

    init.sqf

    SMN1279_fnc_Restriction = compile preprocessFileLineNumbers "MP_SMN_fn_restriction.sqf";

    MP_SMN_fn_restriction.sqf

    _t = _this select 0;
    
    waitUntil 
    {
    	if(!alive player) exitwith {};
    	_text = format ["GET BACK OR YOU'LL DIE IN: %1 Seconds", _t];
    	hint _text;
    	sleep 1;
    	_t = _t - 1;
    
    _t == 0
    };
    
    if(!alive player) exitwith {};
    hint "YOU DESERTER!";
    
    sleep 0.5;
    player addRating -10000;
    player setDamage 1 ;

    I don't know what I'm doing wrong. The trigger triggers even when I'm not in the area.

    How do I regulate it so that it does only trigger when a helicopter enters the area?


  9. Hello friends,

    I've been getting into the Arma 3 Editor and I'm having a lot of fun so far, but I still can't realize everything I want to.

    With this I've been struggling the last two nights:

    I've got an ellipse zone on my map and another smaller one within.

    When a chopper enters the large one, there shall be a chat messaged displayed to all passengers and the pilot of the heli.

    When entering the inner zone, the chopper shall be destroyed via script.

    I created the zones and a trigger, but I have absolutely no idea how to do this. (also: grouping trigger and chopper is not an option unfortunately)

    Thanks in advance

    chrisyou


  10. Thanks a lot good sir, we appreciate it ;)

    Now its running nearly perfect! just trying to figure out how to add another garage and a new helicopter spawn + garage

    Basically, all you need to do is going through the methods and inits of existing garages and copy the function.

    Make sure the created NPC is connected to the Master NPC Group. That should fix it..

    Anyone got a clue why my custom item is not displayed in the trader's dialog? - fixed


  11. Hi, I added a custom job.

    Everything works for now, except of the trader npc. Is there anything I could have missed / should have known?

    Pushing this. Maybe I should go a little more into detail.

    The item itself is illegal (and as a whole pretty much the same as the turtles).

    Collecting the item works just fine (I tried to copy the way the gathering cannabis action works). After the process of collecting, the item is placed in the inventory. I created an npc just for processing. Works just fine (also with the license integration). After the processing is done, the processed item is added to the inventory.

    My issue is that if you go up to the trader for these items, the items of your inventory do not show up in the shop window. It's entirely blank. NPC init is this:

    this allowDamage false; this enableSimulation false; this addAction["Biowaffenschmuggel",life_fnc_virt_menu,"bioguns"];

    The item itself however is mentioned in the master array of items (guess otherwise the collecting / processing wouldn't even work) and in the sell_array.

    What am I missing?


  12. Okay, Thanks, I'll try to figure this out. It wouldn't save ANY items aside of an empty back pack and clothes. Even the tactical vest or bandolier and toolkits/medikits disappeared, it was disappointing lol... Is there a way to fix it so it doesn't require a GPS to save?

    Only other issue I have currently is the Rebel Shops, Vehicles claim to spawn, and take your money, but the vehicle doesn't load up anywhere on the map. AKA Doesn't really spawn in.

    Could be that there is no vehicle spawn point assigned for the Rebel Shops


  13. OK then that was uhh... not expected.. It appears that I was misinformed by the Wiki (What a shocker). Worked fine in initial tests but apparently not in a dedicated environment...

    Here is the fixed one:

    Hey Tonic.

    You're doing a great job with bringing this play mode to us, keep it up!

    I've translated the entire mission into German. I already had to re-do the translation when you released 3.1.1

    I'm sure you understand I really don't want to go over every single script file again to completely translate the fix patch. Could you tell me which files you modified exactly? So that I just replace and translate them.

    That'd save me a lot of time :)

×