dachevs
Member-
Content Count
288 -
Joined
-
Last visited
-
Medals
Everything posted by dachevs
-
I'd rather not. Im just wondering is it designed by same guy and re-brought in?
-
yeh but look at it. Same objectives, conquer the island. Commanders both use MHQ's Same keys and basic design of dialogs, though Warfares are prettier.
-
Ending my script when dammage = 0
dachevs replied to ADuke's topic in ARMA - MISSION EDITING & SCRIPTING
using alive will make the guy play the move all the time, becuz even if he is damaged or not he is alive. -
IMO this is just Warfare.
-
The mayor election was actually implemented by TeRp and then SL:U put it in theirs.
-
Delta, talk to Sniper, he got the searchlight working on the Bell and said he could do it on other vehicles. We could do the alley lights you were asking for like that.
-
Moving markers disappear upon respawn
dachevs replied to Rawhide's topic in ARMA - MISSION EDITING & SCRIPTING
You need to set the script again when 'alive _obj' <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // Set local variables private ["_obj","_marker"]; // Get Object _obj = _this select 0; //_marker = format["%1",group _obj]; //Changed it to work on each unit instead of group; _marker = format["%1",_obj]; // Create marker and set marker shape, type, size and text createMarkerLocal [_marker, position _obj]; _marker setMarkerShapeLocal "ICON"; _marker setMarkerTypeLocal "Dot"; _marker setMarkerSizeLocal [.3,.3]; _marker setMarkerColorLocal "ColorBlack"; //No text on marker wanted; //_marker setMarkerTextLocal _marker; while {alive _obj} do { sleep 1; _marker setmarkerposLocal position _obj; }; deletemarkerLocal _marker; waitUntil {alive _obj}; x = [unitname] execVM "Markers\markersBlack.sqf"; -
--> init.sqs <-- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [] exec "check.sqs"; action_activated = false; --> check.sqs <-- <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #loop _people = nearestObjects [player, ["Man"], 2] _man = _people select 0 ? (!alive _man) : goto "check" ? (count _people < 1) goto "none" #check ? (action_added) : goto "loop" _search_ac = _man addAction ["Search for Weapons", "search.sqs"]; action_added = true #none action_added = false; player removeAction _search_ac ~1 goto "loop" Im sorry if this does not work, I do not like .sqs and am unable to test this at the moment. I could do it in .sqf, but that does not work in OFP
-
Prevent player picking up certain weapons
dachevs replied to dr_eyeball's topic in ARMA - MISSION EDITING & SCRIPTING
run script locally on from init.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> [] execVM "forbidden_weapons.sqf"; forbidden_weapons.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> forbidden_weps = ["PipeBomb"]; forbidden_mags = []; for [{_i=0}, {_i < 1}, {_i=_i+1}] do { { if (_x in forbidden_weps) then { player removeWeapon _x; }; } foreach weapons player; { if (_x in forbidden_mags) then { player removeMagazine _x; }; } foreach magazines player; Sleep 0.4; }; -
switch weapon automatically
dachevs replied to twisted's topic in ARMA : CONFIGS AND SCRIPTING (addons)
no problem. Yes, basically, what happens with the ammo is that, when you have a weapon, and its magazines, and you drop/remove that weapon, whilst keeping the magazines for it. Any time you pick a new weapon up, ArmA sees those mags and no weapon to match it too, so it automatically drops them. Where as, if you remove/add the same type of weapon, the magazines will not move. -
switch weapon automatically
dachevs replied to twisted's topic in ARMA : CONFIGS AND SCRIPTING (addons)
I already posted a code to switch on actionmenu -
switch weapon automatically
dachevs replied to twisted's topic in ARMA : CONFIGS AND SCRIPTING (addons)
why not do it through an action? <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> player addAction ["Bipod Down", "\Your Weapon\bipod.sqf", [0]]; of course if you want it in your addon, you would have to define a Class UserActions in your config. bipod.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _case = ((_this select 3) select 0); _user = _this select 1; switch (_case) do { case 0: { if (!("Weapon_Bipod_Up" in weapons _user)) exitWith {}; _user removeWeapon "Weapon_Bipod_Up"; _user AddWeapon "Weapon_Bipod_down"; _user removeAction (_this select 2); _user addAction ["Bipod Up", "\Your Weapon\bipod.sqf", [1]]; }; case 1: { if (!("Weapon_Bipod_down" in weapons _user)) exitWith {}; _user removeWeapon "Weapon_Bipod_Down"; _user AddWeapon "Weapon_Bipod_Up"; _user removeAction (_this select 2); _user addAction ["Bipod Down", "\Your Weapon\bipod.sqf", [0]]; }; }; ------ Of course replacing the Weapon_Bipod_Up wit the classname of the weapon with the bipod up, and vise versa hehe -
ur can put in the Initialization line of the unit: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> hint format ["%1", typeOf this] as well similar to what Deadfast say
-
Making Player's name appear in titletext?
dachevs replied to Jamoose's topic in OFP : MISSION EDITING & SCRIPTING
hehe no problem. -
_id in onPlayer(Dis)Connected
dachevs replied to mr.peanut's topic in ARMA - MISSION EDITING & SCRIPTING
I believe its your in-game ID (The one that is listed in your Profile when you hit edit ingame) -
What if it is infected though? I know Mapfact wouldnt do that, but I am saying, that what if it got infected during the process of compressing.
-
Hello, basically, I have a variable for money in my mission. I need to know how to save that variable to the server, so when I reconnect, I get that variable back. WHAT I KNOW: -I know to use the OnPlayerConnected. -I believe I have to save it into an array on the server, which I have done, but I don't know how to access something from an array which is only on the server. Can anyone help me out?
-
right, I believe its an array. And save it on the server. then when they connect: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _name = _this select 0; _savedmoneyvariable = Server_Stats_Array select 0; if (player == _name) then { Cash = Cash + _savedmoneyvariable }; maybe something along these lines? I would love more help Captain, thanks
-
try: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> {_x action ["eject", vehicle _x} foreach crew plane1;
-
Making Player's name appear in titletext?
dachevs replied to Jamoose's topic in OFP : MISSION EDITING & SCRIPTING
unit1 addaction ["Say Hello", "Hello.sqs"]; hello.sqs <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 titleText [format["Hello, How are you %1?", _unit], "Plain"] exit -
I think you are talking about an XML. http://community.bistudio.com/wiki/squad.xml if not, the only way setObjectTexture works, is if the textures are defined in the model or config itself for the model to use.
-
FOR FIRST RELEASE When you Buy a car, if you have any extra money drop it on the floor first, or when you purchase the car it will take the amount of money out for the car plus the same amount out in any other money too. FOR EXAMPLE: If the car is $500 and you have $500 in your pocket as well as $1000, it will remove the $500 plus the $1000, and give you $500 back, but you still lose $500. But If you have to much for the car that is fine---FOR EXAMPLE: If you have $1000 and the car costs $500, when you purchase the car, you will receive $500 back. I can remove this all together, but then you would have to have the exact amount and if you didn't it would say you don't have enough. FOR EXAMPLE: If the car is the $500 object and you had a $1000 object it would say you don't have enough. WHAT WOULD YOU WANT MORE? * AS PROMISED PICTURES (BOTTOM OF PAGE) -UPDATED-!!! * I am working on a new mod. It is an RPG. This is similar to the popular Sahrani Life mod. Though this mod will feature a new money system and many add ons including new weapons and vehicles. The money system uses the new released Roleplay Objects thanks to Al Simmons and Tiger. I have written many scripts for buying cars and licenses, etc. But there are a few problems in which I'm trying to work out. The biggest is when you purchase a vehicle, it unlocks the car and removes the money from you, though if you have no money, it unlocks the car anyway. So everyone would just cheat and get the cars for free. Could anyone help me with finishing this script to make a hint appear if the person has no money in their inventory and NOT unlock the car?? FEATURES: -Car Lot -Walk In Bank -Actual Money, It is in your inventory and you can drop it pick it up and so on. -Jail with Opening cells -Soccer -Cell Phones, as well in your inventory -------------------------- <s>Bank accounts, as of now, the bank accounts are cars. Yes at first this sounds weird, well this is weird lol. But cars actually lock. So each Civilian has his own car (Bank Account) that he can lock/unlock, the other civilians cannot unlock each others account. So when you wish to deposit/withdraw money into your account, you simply unlock it, get in the car and hit G (which will go to Gear). Then you drop the money or take the money you choose, hop out, lock it and your good. This is strange but it will be changed, ONCE I figure out how to Lock Ammo boxes. (IF ANYONE ONE KNOWS HOW, Please enlighten me)</s> RESOLVED!!! --------------------------- SHOULD BE FINISHED SOON!!! ---Video as well or soon! Cop Cars DViper *EDIT* <s>Viper won't be available in Black for the first release, for some reason it won't create, but the Red Viper does. the VIPER will still be available, though just in Red.</s> GOT IT WORKING NOW! Police BCuda Bank Rob NEW--For a Secret Service sort of thing. What I want is to have at the cop base a building to choose different roles like Secret Service, FBI and SWAT. Audi PD Car
-
lol |3lue Yeah, I like the spikestrip alot more IMG, thx for that
-
Using local variable in setvehicleinit
dachevs replied to Mr Groch's topic in ARMA : CONFIGS AND SCRIPTING (addons)
I don't believe so no. //replace newplace with the name of the area you want your player to move to. other than: _unit setPos (getPos newplace); as far as your weaponholder, try kronzky's script: Weapons Placer and do something to get weapons like this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> //the name of your weaponholder, change if needed _weps = weapons weaponsholder _mags = magazines weaponholder {_crate1 addweaponcargo _x} foreach _weps; {_crate1 addmagazinecargo _x} foreach _mags; -
Using local variable in setvehicleinit
dachevs replied to Mr Groch's topic in ARMA : CONFIGS AND SCRIPTING (addons)
why not just have him move in, I don't think there is need for setVehicleInit. Its through an action, _this select 0 is the person the action is attached to. Soo...try <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0; _object = "xx" createvehicle (getpos player); _unit moveincargo _object;