Jump to content

Fox059

Members
  • Content Count

    21
  • Joined

  • Last visited

Everything posted by Fox059

  1. I'm trying to run script on my mission, I'm new to programming And I have some questions. In the editor It works when I call the scripts. mission.sqm editor class Item3 { dataType="Object"; class PositionInfo { position[]={2727.9951,27.003584,1274.358}; angles[]={6.2481914,1.0143853,0.11449359}; }; side="Empty"; flags=4; class Attributes { init="nul = [this,45,60,{ [] execVM ""scriptText.sqf""; }] execVM ""scriptCont.sqf"";"; }; id=10; type="Target_PopUp_Moving_90deg_Acc1_F"; }; When I try to call the same script in my mission altisLife. Does not work. mission.sqm - AltisLife class Item876 { dataType="Object"; class PositionInfo { position[]={2727.9951,27.003584,1274.358}; angles[]={6.2481914,1.0143853,0.11449359}; }; side="Empty"; flags=4; class Attributes { init="this addAction[45,60,""life_fnc_scriptText""]; this addAction[""life_fnc_scriptCont""];"; }; id=10; type="Target_PopUp_Moving_90deg_Acc1_F"; }; I have in core\scripts ( fn_scriptText.sqf ) and ( fn_scriptCont.sqf ) I also have in Functions.hpp class scripts { file = "core\scripts"; class scriptText {}; class scriptCont {}; }; I believe the error is in init="nul = [this,45,60,{ [] execVM ""scriptText.sqf""; }] execVM ""scriptCont.sqf"";"; From my mission, But I still do not understand how to call these scripts. Sorry for my English, Any help, I'm grateful.
  2. Fox059

    Help - Doubt with script

    I'm trying to understand knowledge and learning. I am creating any kind of simple script I would like to know how I can call any script To run on the server And how to call any script to run on the client. I appreciate your attention, Thank you.
  3. Fox059

    Help - Doubt with script

    Thank you. I still can not get the expected result, With my scripts. How can I get each client to run the script ( fn_scriptText.sqf ).
  4. Fox059

    [ Help Simple_UI ] Stamina

    After the tutorial, Simple_UI per - CptGooch. I added this in my code " fn_hudUpdate.sqf " after : //Update Money _money ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.374]; if(_cash >= 1000000) then { _cash = round(_cash / 1000000); _money ctrlSetText format["%1", format["%1 M",[_cash] call life_fnc_numberText]]; } else { if(_cash >= 100000) then { _cash = round(_cash / 1000); _money ctrlSetText format["%1", format["%1 K",[_cash] call life_fnc_numberText]]; } else { _cash = round _cash; _money ctrlSetText format["%1", format["%1",[_cash] call life_fnc_numberText]]; }; }; _money ctrlCommit 0; that: //Update fatigue _ctrlSta ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.322]; _ctrlSta ctrlSetText format ["%1%2", round((1 - (getFatigue player)) * 100), "%"]; _ctrlSta ctrlCommit 0; It works, but only works when, Some others are updated, such as. food , water , health, weight, money. Not updated automatically when I'm running with a player. Any idea where I can call the update for my Fatigue. It looks like the tutorial topic has been deleted. Sorry about my English.
  5. Fox059

    [TUTORIAL] New Spawn Menu Layout

    Any idea. my background Black, Not shown In the menu in respawn.
  6. Fox059

    [ Help Simple_UI ] Stamina

    Here are my files, version 5x UI.rar
  7. Fox059

    [ Help Simple_UI ] Stamina

    I'm too young to create a tutorial, If you want, I can share my script here. I do not know if I can share in this same topic
  8. Fox059

    [ Help Simple_UI ] Stamina

    Ok Solved. If someone who followed the tutorial is interested in " fn_hudUpdate.sqf " to replace private["_ui","_food","_water","_health","_weight","_money","_cash"]; per private["_ui","_food","_water","_health","_weight","_money","_cash","_ctrlSta"]; Below _money = _ui displayCtrl 23525; Add _ctrlSta = _ui displayCtrl 23550; Below _money ctrlCommit 0; Add //Update Fatigue _ctrlSta ctrlSetPosition [safeZoneX+safeZoneW-0.090,safeZoneY+safeZoneH-0.322]; _ctrlSta ctrlSetText format ["%1%2", round((1 - (getFatigue player)) * 100), "%"]; _ctrlSta ctrlCommit 0; in " fn_hudSetup.sqf " Added at the end [] spawn { private ["_fat"]; for "_i" from 0 to 1 step 0 do { _fat = getFatigue player; waitUntil {!((getFatigue player) isEqualTo _fat)}; [] call life_fnc_hudUpdate; }; }; in " dialog\hud_stats.hpp" Below class moneytext { type=0; idc=23525; style=0; x=-1; y=-1; w=0.3; h=0.05; sizeEx=0.03; size=1; font="PuristaSemibold"; colorBackground[]={0,0,0,0}; colorText[] = { 1 , 1 , 1 , 1 }; shadow=1; text=""; }; Add class fatingtext { type=0; idc=23550; style=0; x=-1; y=-1; w=0.3; h=0.05; sizeEx=0.03; size=1; font="PuristaSemibold"; colorBackground[]={0,0,0,0}; colorText[] = { 1 , 1 , 1 , 1 }; shadow=1; text=""; }; Download UI. UI.paa
  9. Fox059

    [TUTORIAL] Cop / Medic barriers via menu 4.0+

    life_barrier_active = false; life_barrier_activeObj = ObjNull; life_placeables = [ ["Cone","RoadCone_F", { "life_coplevel", "SCALAR", 3 } ], ["Cone With light","RoadCone_L_F"], ["Wooden barrier","RoadBarrier_F"], ["Wooden barrier with light","RoadBarrier_small_F"], ["Orange plastic barrier","PlasticBarrier_03_orange_F"], ["Concrete barrier","Land_CncBarrier_stripes_F"], ["Portable light","Land_PortableLight_single_F"], ["Portable Light (Double)","Land_PortableLight_double_F"] ]; life_bar_placey = []; It did not work, maybe I'm wrong in the code. No errors in RPT
  10. Thanks, it worked perfect now.
  11. Great tutorial Perfect works in v 5.0. Can someone tell me How to hit the player whose key to use.
×