silentx3ro
-
Content Count
11 -
Joined
-
Last visited
-
Medals
Posts posted by silentx3ro
-
-
For every player, either a killed EH or a script that goes waitUntil {!alive _unit}; store weapons and ammo into arrays local to each unit. Then waitUntil {alive _unit}; add back wepons and ammo from arrays local to each unit. For more advanced handling if items, check out Domination code, deals with plenty of stuff you should be aware of.Ok so I've tried to set up a killed EH and a script, using what info i could find in Faq's and on these forums but have had no luck getting it to function. Could some one give me a simple step by step of what I should be doing (A script would be prefered but at this point ill take what I can get :D)
Your patience and assistance is appreciated. :)
Cheers
Silent
-
For every player, either a killed EH or a script that goes waitUntil {!alive _unit}; store weapons and ammo into arrays local to each unit. Then waitUntil {alive _unit}; add back wepons and ammo from arrays local to each unit. For more advanced handling if items, check out Domination code, deals with plenty of stuff you should be aware of.awsome will do, thanks
-
-
wow...you could leave me on an island for a million years and I would never work out how to do that!
I'll give this a shot and let you know.
Edit:Works perfectly, thanks alot! :)
---------- Post added at 10:03 PM ---------- Previous post was at 08:57 PM ----------
One other thing i hope you folks could help with,
I'm using the following so that my clan members can spawn in with their prefered weapon loadouts addapted from this thread;
In init.sqf
null=[] execVM "clankits.sqf"; //Runs Clan Gear Loader
clankits.sqf
// Spawns clan members in with prefered kits WaitUntil{not isNull player}; waitUntil {(getPlayerUID player) != ""}; _uid = getPlayerUID player; _title = ""; _text = ""; clan =""; #include "kitlist.sqf"; sleep 1; hint parseText (_title + _text);and finally kitlist.sqf
//clan member kit list sleep 35; switch(_uid)do { case "xxxxxxx": // silentx3ro { removeAllWeapons player; {player addmagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4,5,6]; player addWeapon "G36K"; {player addmagazine "SMAW_HEAA";} forEach [1,2,3,4]; player addWeapon "SMAW"; {player addmagazine "pipebomb";} forEach [1,2]; {player addmagazine "Laserbatteries";} forEach [1,2]; player addweapon "Laserdesignator"; player addweapon "NVGoggles"; hint "Gear Loaded" }; };Everything works as planned except when a player respawns they have the same gear they died with. I would like to make the above script run again after respawn so the player has full ammo on respawn.
What would I need to change so that it does?
-
i guess i can give it a shot...I'll be back when I break something.
-
Messed arround with it a little but no matter what I do I cant get the eventhadler to reapply when the vehicle respawns.
Anyone got any ideas how to make this happen?
-
awesome, I'll give it a go.
EDIT: Works like a charm!
Thanks so much, I cant tell you how much grief this has given me!!
Thanks to everyone who helped out.
Cheers
silentxero
---------- Post added at 07:55 PM ---------- Previous post was at 07:43 PM ----------
One question. Will this work on vehicles that respawn or will that require something different?
-
Ok new day new attempt to get my head around this.
Thanks for your reply. I'll give that a try in single player to get to grips with the code but i take it populating the array like that would be no use in multiplayer?
Thing is I understand the logic behind what needs to be done I just dont know how to word it so the the game knows too (or where abouts to put it for that matter!).
Here is, the way I see it, what needs to happen. I know that the syntax is wrong but its just to give a clearer idea of what I'm trying to do on my clan's public server.
Player A enters vehicle which triggers the following;
Check vehicle type if vehicle type != AH1Z, AH64D, A10, AV8B, F35B then stop script else (get Player A's UID) if (Player A's UID != UID on clan list) then eject Player A hint "You are not authorised to use that vehicle!" else hint "Clan member confirmed - Good Hunting!"I'm off to read the Arma 2 scripting faq again in the hope that overnight all the words have moved around and now somehow make sense to me!
Any help on this is appreciated.
Thanks
silentx3ro
-
Most likely...i'm not.
I can't emphasize enough how little I know what I'm doing. :eek:
Basically i'm doing this cause no one else wanted to :p
The reason that I put that array there...most likely because from what I could decipher from faq's that seemed like as good a place as any :confused:
Honestly though anything you can see in what I've posted that looks wrong almost certainly is!
So...how should I populate that array?
-
Hello all,
First let me apologise if this is in the wrong place or a repost but I've been searching various forums for litterally most of the day (started at 12pm its now 1am o_O) and haven't found anthing that has helped.
What I am aiming to do is to restrict access to vehicles (specifically Jets and attack choppers) to only allow members of my clan. the server is running Domination 2.10 and basicaly were sick of coming into the server to find attack aircraft wrecked overnight and wrecks lying all over the map.
I found a few posts relating to restricting access but all they've done so far is confuse me further.
I am a complete scripting novice and have little to no idea what im doing.
Ideally it would be scripted to apply to all starting attack aircraft AND any spawned as side mission rewards. Also I would like to have it work of Player UID or our squad xml but have no idea how to do either.
This is what I've been trying to get to work using player names (adapted from Franze's post in this thread here) but so far have been unable to get it to work, most likely because I've naffed up something in the code I've changed.
in vehicle init: RestrictAccess = this addEventHandler ["getin", {_this execvm 'crewcheck.sqf'}]array = _this; _vehicle = _this select 0; _position = _this select 1; _man = _this select 2; _crewarray = [PLAYERNAME]; if (!(_man in crewarray)) then { hint format ["%1, you are not authorised to use this vehicle",name _man]; _man action ["eject",_vehicle]; };Any help that anyone can give would be hugely appreciated, I have honestly never been more annoyed and confused by anything in my life (with the exception of reality TV!).
Thanks
silentx3ro
Restricting access to vehicles
in ARMA 2 & OA : MISSIONS - Editing & Scripting
Posted
Ok so i really am coming up at a complete loss with this i managed to get it to work, sort of, but with an EH on each playable character but this really isnt any use for my clans server as we tend to run alot of different missions so would need to add the EH to every playable character in ever mission and any new ones.
Could someone direct me to a post how to get the same result using a script? it would still need to be added to all the missions but it would make life a little easier!
I've tried doing a few searches but i cant seem to find anything that fits the bill.