Jump to content

sina alex

Member
  • Content Count

    25
  • Joined

  • Last visited

  • Medals

Everything posted by sina alex

  1. hello , i have run a test (about showing a target scene what there an ai must start fire 3 round of mortart to my target via mortar) on single player and multiplayer on my pc in both of ways it work successfully, camera start moving and show mortar and the ai start fire fine, but when i up the mission to server for test the ai wont fire and just camera show he and he still not fire, i test this codes on server : _camera = "camera" camcreate position h2; _camera cameraeffect ["internal", "back"]; _camera camPrepareTarget g2; _camera camCommitPrepared 5; g2 commandArtilleryFire [position han2, "8Rnd_82mm_Mo_shells",3]; _camera camPreparePos position h2_1; _camera camPrepareFOV 0.700; _camera camCommitPrepared 6; _camera camPrepareFOV 0.700; waitUntil {camCommitted _camera}; _camera cameraEffect ["terminate","back"]; camDestroy _camera; for sure i test another command as : _camera = "camera" camcreate position h1; _camera cameraeffect ["internal", "back"]; _camera camPrepareTarget g1; _camera camCommitPrepared 5; g1 doArtilleryFire [position han1,"8Rnd_82mm_Mo_shells",3]; _camera camPreparePos position h1_1; _camera camPrepareFOV 0.700; _camera camCommitPrepared 6; _camera camPrepareFOV 0.700; waitUntil {camCommitted _camera}; _camera cameraEffect ["terminate","back"]; camDestroy _camera; both kind of codes work just in single and mp mod in my pc, and not work on server. any help have my regards.
  2. thank for answer, i use execvm in triger from game and on triger ,address the sqf file code as i send there. execvm "S\1.sqf"; as you say the code must run on each client i can use this? [param] remoteExec ["doArtilleryFire", ([0, -2] select isDedicated), true]; and how i can insert my code on param part ?! g1 doArtilleryFire [position han1,"8Rnd_82mm_Mo_shells",3];
  3. hello there i have a question about show video on billbord for players who are infront of it via add action, so we create a trigger and add below code on it: vp is name of the Addaction object call{[vp, "Pakhsh", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 2", "_caller distance _target < 2", {}, {}, { _video = "V\reza.ogv"; _screen = namayeshgar; _screen setObjectTexture [0, _video]; [_video] remoteExec ["BIS_fnc_playVideo", ([0, -2] select isDedicated), true]; m1 setObjectTextureGlobal [0,"P\rs.jpg"]; m2 setObjectTextureGlobal [0,"P\ma.jpg"]; }, {hint "Laghve tanzim";}, [], 5, 1000, false, false, true ] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true];}; when i test this code i just find it the video is just visible by who call add action and not somebody else. how i can do it for all players infront of that billbord?
  4. one question, with this code: [_video] remoteExec ["BIS_fnc_playVideo", ([0, -2] select isDedicated), true]; when we set billbord texture with our video file as global texture, do we have a duplicate on video play?
  5. sina alex

    Eden 2.0

    if i use sectors of eden2 i need just install mod on server side or in all server and clients who want play it?
  6. hello i use gui editor and create a tablet. and whats the plan: the tablet that have 3 picture(each picture are clickable) and when player click picture a loadout apply on him as this code: question 1 : how i can tell who active addeventhandler to group him,and apply loadout on his group? question 2 : wich code i need to close tablet as a exit button? [] spawn { waitUntil {sleep 0.0000001; !isNull (findDisplay 46)}; methembyguimenu1 = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) == 210) then { [] spawn ArsenalDevice; };"]; ArsenalDevice = { _display = findDisplay 46 createDisplay "RscDisplayEmpty"; _guiphone = _display ctrlCreate ["RscPicture", 1200]; _guiphone ctrlSetText "pb.paa"; _guiphone ctrlSetPosition [0.2375, 0.004, 0.5, 1]; _guiphone ctrlCommit 0; _buttenarmy = _display ctrlCreate ["RscActivePicture", 1201]; _buttenarmy ctrlAddEventHandler ["MouseButtonDown", "_this call fnc_armyloadout"]; _buttenarmy ctrlSetText "army.paa"; _buttenarmy ctrlSetPosition [0.38, 0.26, 0.2125, 0.08]; _buttenarmy ctrlCommit 0; _buttensns = _display ctrlCreate ["RscActivePicture", 1202]; _buttensns ctrlAddEventHandler ["MouseButtonDown", "_this call fnc_snloadout"]; _buttensns ctrlSetText "sns.paa"; _buttensns ctrlSetPosition [0.38, 0.36, 0.2125, 0.08]; _buttensns ctrlCommit 0; _buttennop = _display ctrlCreate ["RscActivePicture", 1203]; _buttennop ctrlAddEventHandler ["MouseButtonDown", "_this call fnc_noploadout"]; _buttennop ctrlSetText "nop.paa"; _buttennop ctrlSetPosition [0.38, 0.464, 0.2125, 0.08]; _buttennop ctrlCommit 0; fnc_armyloadout = { _pg = _this select 0; "laa" remoteExec ["playSound"]; hint "loading"; { removeAllWeapons _x; removeAllItems _x; removeAllAssignedItems _x; removeUniform _x; removeVest _x; removeBackpack _x; removeHeadgear _x; removeGoggles _x; _x addWeapon "CUP_arifle_G3A3_ris_black"; _x addPrimaryWeaponItem "CUP_20Rnd_762x51_G3"; _x addPrimaryWeaponItem "CUP_bipod_G3"; _x addWeapon "CUP_launch_RPG7V"; _x addSecondaryWeaponItem "CUP_optic_PGO7V3"; _x addSecondaryWeaponItem "CUP_PG7V_M"; _x addWeapon "rhsusf_weap_m9"; _x addHandgunItem "rhsusf_mag_15Rnd_9x19_JHP"; _x forceAddUniform "rpat_urban_1_uniform"; _x addVest "ARMY_V_PlateCarrier_ACU_L"; _x addBackpack "B_Carryall_oucamo"; _x addWeapon "rhsusf_bino_m24_ARD"; for "_i" from 1 to 5 do {_x addItemToUniform "ACE_packingBandage";}; for "_i" from 1 to 4 do {_x addItemToUniform "ACE_morphine";}; for "_i" from 1 to 4 do {_x addItemToUniform "ACE_tourniquet";}; for "_i" from 1 to 15 do {_x addItemToUniform "ACE_fieldDressing";}; for "_i" from 1 to 5 do {_x addItemToVest "CUP_20Rnd_TE1_Yellow_Tracer_762x51_G3";}; for "_i" from 1 to 2 do {_x addItemToVest "SmokeShell";}; for "_i" from 1 to 2 do {_x addItemToVest "rhsusf_mag_15Rnd_9x19_JHP";}; for "_i" from 1 to 2 do {_x addItemToVest "rhs_mag_m67";}; for "_i" from 1 to 49 do {_x addItemToBackpack "ACE_fieldDressing";}; for "_i" from 1 to 30 do {_x addItemToBackpack "ACE_morphine";}; for "_i" from 1 to 4 do {_x addItemToBackpack "ACE_tourniquet";}; _x addItemToBackpack "ACE_Flashlight_XL50"; _x addItemToBackpack "ACE_IR_Strobe_Item"; _x addItemToBackpack "ACE_EntrenchingTool"; for "_i" from 1 to 3 do {_x addItemToBackpack "ACE_epinephrine";}; _x addItemToBackpack "ACE_EarPlugs"; _x addItemToBackpack "ACE_SpraypaintBlue"; _x addItemToBackpack "ACE_SpraypaintBlack"; _x addHeadgear "marpat_urban_helmet"; _x linkItem "ItemMap"; _x linkItem "ItemCompass"; _x linkItem "tf_microdagr"; _x linkItem "tf_anprc152"; _x linkItem "ItemGPS"; _x linkItem "rhsusf_ANPVS_15"; } foreach _pg; }; }; };
  7. sina alex

    [need help] GUI Editor

    i want use it on a dedicated mp server. if i use player for apply loadouts it will not apply to every player in server?? i want apply just on who use menu
  8. You can spawn a group in your trigger and for example name it mygroupname then use : Condition: This Active: Anyplayer On activation: Hint "oh you find us.."; { _x joinSilent (group player)} foreach units mygroupname; Then player move in trigger and group join him and hint text showed. You can use some sound too For better effect.
  9. sina alex

    [need help] GUI Editor

    I will test it,thank you
  10. hey everyone i have a problem in this code: main tip : player stay near sign and in holdaction spawn a code that will apply new loadout on him but problem is there i see this loadout applyed on others too. server is dedicate code work but applyed on all not that player who call it. of course i use a group the caller to prevent from apply to all with this code _pg = group _caller; and code will apply to forEach units _pg; help me up to prevent to apply to others [s4, "LoadOUT", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_search_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 2", "_caller distance _target < 2", {"laa" remoteExec ["playSound"];}, {hint "iw";}, {_pg = group _caller; { removeAllWeapons _x; removeAllItems _x; removeAllAssignedItems _x; removeUniform _x; removeVest _x; removeBackpack _x; removeHeadgear _x; removeGoggles _x; _x addWeapon "hlc_smg_MP5N"; _x addPrimaryWeaponItem "hlc_30Rnd_9x19_B_MP5"; _x addWeapon "rhsusf_weap_m9"; _x addHandgunItem "rhsusf_mag_15Rnd_9x19_FMJ"; _x forceAddUniform "B_BLK_BLK_soldier_F_uniform"; _x addVest "IRI_V_Sheriff_BA_TB"; _x addWeapon "Binocular"; _x addItemToUniform "FirstAidKit"; for "_i" from 1 to 2 do {_x addItemToUniform "hlc_30Rnd_9x19_B_MP5";}; _x addItemToUniform "SmokeShell"; _x addItemToUniform "MiniGrenade"; for "_i" from 1 to 3 do {_x addItemToVest "hlc_30Rnd_9x19_B_MP5";}; _x addItemToVest "rhsusf_mag_15Rnd_9x19_FMJ"; for "_i" from 1 to 5 do {_x addItemToVest "rhs_mag_mk84";}; for "_i" from 1 to 2 do {_x addItemToVest "MiniGrenade";}; _x addItemToVest "SmokeShell"; _x addHeadgear "H_PASGT_basic_black_F"; _x addGoggles "G_Balaclava_TI_G_blk_F"; _x linkItem "ItemMap"; _x linkItem "ItemGPS"; _x linkItem "ItemCompass"; _x linkItem "ItemWatch"; _x linkItem "ItemRadio"; _x linkItem "NVGoggles_OPFOR"; [_x,"Pad_A3_01","male01per"] call BIS_fnc_setIdentity; [_x,"rw_Service_qe"] call BIS_fnc_setUnitInsignia; } forEach units _pg; hint "NO"; }, {hint "Lm";}, [], 2, 1000, false, false, true ] remoteExec ["BIS_fnc_holdActionAdd",[0,-2] select isDedicated,true];
  11. sina alex

    [need help] loadout script

    need add a line to fix the problem?? deleteGroup _pg;
  12. hello everybody i have a plan about marking th position where , the player killed. so in init.sqf in addEventHandler killed i add a sign(empty small wooden ), i try add command for give it init to set globaltexture command but not work. the sign just got spawn with no screen on it,(my init cmd not activated). its code : Player addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; if (side _unit == independent) then { systemchat "_unit killed by _killer"; _f1 = createvehicle ["FlagCarrierChecked", getPos _unit, [], 0, "NONE"]; _f1 setVehicleInit "this obj setObjectTextureGlobal [0,'p\1.jpg']"; hint "You killed by _killer";nul = [] execVM "onPlayerKilled.sqf"; }; }]; help me to spawn that sign with my custom pic on dead pos.ty
  13. like it? _f1 = createvehicle ["FlagCarrierChecked", getPos _unit, [], 0, "NONE"]; _f1 setObjectTextureGlobal [0,"p\1.jpg"]; ??
  14. thank for answer. i know it about formating a dialog or chat. and about killing board. now what i can do for add init to spawned objects via script??
  15. hello i have make a pvp so i have a few funactions what i must do to add them in scripts and call them in game i read a few topics about description.ext and cfgs but i cant know it any one plz give me better explain i have my funactions but i dont know where and how must define them
  16. hello its a mp code runned by addaction on medical tent whe player distance are less 12m Chador addAction ["test", "S\test.sqf",nil,1.5,true,true,"","",12,false] in test on sp mode error say about the sqf file _Player = #_this select 1; i think its about last line i call sqf more time but how fix it? test.sqf _player = _this select 1; _Bim = _this select 0; _f = _this select 2; params ["_Bim","_Player","_Playerg","_Damage","_majruhin","_Newhealth","_playerpos"]; _playerpos = getPos _Player; _Damage = (damage _Player); _majruhin = []; _Playerg = group Player; _Newhealth = _Damage - 1; if ( _Damage > 1 ) exitWith {hint format ["%1 salamatiye shoma kamel ast", name _Player];}; if ( (_Damage < 100) && _Player distance _Bim < 10) then { _med1 = "C_Man_Paramedic_01_F" createvehicle [605.027,5290.74,0]; _med2 = "C_Man_Paramedic_01_F" createvehicle [605.027,5290.74,0]; _medteam = creategroup civilian; _medteam = []; [_med1,_med2] pushBack _medteam; _gp = [_majruhin,_medteam]; { [_x] disableAI "MOVE"; [_x] allowdamage false;} forEach (_medteam); sleep 5; HINT "CRETED AND PB"; SLEEP 1; [_Player] pushBack _majruhin; { _x enableAI "MOVE"; _x doMove (_playerpos);}forEach (_medteam); { _x disableAI "MOVE"; _X playAction "Medic";}forEach (_majruhin); sleep 1; _Player setDamage _Newhealth; hintSilent format [" %1 mizane salamatiye shoma %2 afzayesh yaft ", name _Player, _Newhealth]; sleep 2; { _x enableAI "MOVE"; _X playAction "Medic";}forEach (_majruhin); if ( _Damage > 99 ) then {hintSilent format [ "%1 salamatiye shoma kamel shod", name _Player];}; [_Player] pushBack _Playerg; {_x doMove (getPos _bim);}forEach (_medteam); }; waitUntil {_medteam distance _Bim < 2}; deleteVehicle _med1; deleteVehicle _med2; waitUntil {alive _Player}; execVM "S\test.sqf";
  17. now i read it fully and learned much new codes and tactics im create one for my and test it now
  18. thank for your direct replay i read that cod guess writeed directly by you for example first lines say every think is ok but i need time to know it line by line and extract my code from it im keep reading and research.
  19. Hello First thank you for help me to find new informations. Then i know arrays and params better, i read wiki pages you tell there about params and data types and arrays and varriables i read subjects: append,+,*,-,set varriable,get varriable But for my code i think deep,the only way was near in my mind is create var about _player and _object and _add id And save it on them then get it in next run Its like an view in my mind. What i can do on it?
  20. you are right , im new in scripting so i dont see most of wiki pages like params or i wasnt know it commands use and with near help of opusfmspol i look and follow page of params and first think i find in last page is it by you,i think its my problem fix [1, 2, [3, 4]] call { params ["_one", "_two", "_this"]; params ["_three", "_four"]; }; but a few question to inserting : [ _this select 0, _this select 1, _this select call { params ["_bim", "_player", "_fa"]; }; do its correct or not? or what i must do about it?! plz show me my coding problems , it help me to improve my codings. ty for you answer+helps.
  21. We difine the player who run the script as _Player = _this select 1; And object too _obj = _this select 0; But it definde and synced with add action run Then when it load again in ending script part its not an addaction run and run directly,so defines well not work in next time. Its my problem how i must fix it. Ty
  22. hmmm like no one can commnet and help?
  23. waituntil {_car distance deftank <15}; its correct
  24. hello to all as you read title i want your help to create an script script file run by execVM "";in trigger act script funuction: We have a few spawn pos+vehicle class _vehlist = [ "CUP_C_Datsun", "CUP_C_Golf4_camo_Civ", "C_Van_01_fuel_F", "C_Truck_02_fuel_F", "C_Offroad_01_F", "C_Tractor_01_F", "C_Van_01_box_F"] call BIS_fnc_selectRandom; _sppos = [ [188.522,4703.44,0.615326], [304.739,4569.2,0.615356], [39.5648,4641.1,0.615417], [76.1484,4609.85,0.615448], [71.9008,4719.1,0.615387], [137.652,5080.41,0.615265], [586.002,4753.71,0.615356] ] call BIS_fnc_selectRandom; then define _entehari _entehari = []; and set its group to west _entehari = creategroup WEST; and i use spawnvehicle fnc to create veh with it crew _entehari1 = [_sppos, 0, _vehlist, _entehari] call BIS_fnc_spawnVehicle; then define _car _car = _entehari1 select 0; and make move command _car Move (getPosATL deftank); every think work correct until where i wand make condition with if to i want spawn gbu at vehicle spawned when it have distance lessthan 30m with my deftank(object) i use this code but it dont work,vehicle spawned fine and move to my deftank but if condition not work if ((_car distance deftank)<30) then {hint"1";}; also i want change hint cmd with gbu create veh,tankyou main code: _vehlist = [ "CUP_C_Datsun", "CUP_C_Golf4_camo_Civ", "C_Van_01_fuel_F", "C_Truck_02_fuel_F", "C_Offroad_01_F", "C_Tractor_01_F", "C_Van_01_box_F"] call BIS_fnc_selectRandom; _sppos = [ [188.522,4703.44,0.615326], [304.739,4569.2,0.615356], [39.5648,4641.1,0.615417], [76.1484,4609.85,0.615448], [71.9008,4719.1,0.615387], [137.652,5080.41,0.615265], [586.002,4753.71,0.615356] ] call BIS_fnc_selectRandom; _entehari = []; _entehari = creategroup WEST; _entehari1 = [_sppos, 0, _vehlist, _entehari] call BIS_fnc_spawnVehicle; _car = _entehari1 select 0; sleep 1; _entehari Move (getPosATL deftank); _di = _car distance deftank < 30; if ((_car distance deftank)<30) then {hint"1";};
×