Jump to content

Smart Games

Member
  • Content Count

    55
  • Joined

  • Last visited

  • Medals

Community Reputation

22 Excellent

3 Followers

About Smart Games

  • Rank
    Lance Corporal

Profile Information

  • Gender
    Male
  • Location
    Dresden, Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Smart Games

    Change Text of an edit box

    It didn't work for me, i found an other solution for my problem 🙂
  2. Smart Games

    Change Text of an edit box

    fnc_save = { params ["_nr1","_nr2","_nr3"]; _dialog = findDisplay 12345; _ctrl1 = _dialog displayCtrl _nr1; _ctrl2 = _dialog displayCtrl _nr2; _ctrl3 = _dialog displayCtrl _nr3; _am1 = ctrlText _ctrl1; _am2 = ctrlText _ctrl2; _am3 = ctrlText _ctrl3; if (_am1 < 200) then {_ctrl1 ctrlSetText "200"; player setVariable ["overall_distance",200]}; if (_am1 > 5000) then {_ctrl1 ctrlSetText "5000"; player setVariable ["overall_distance",5000]}; if (_am1 > 200 && _am1 < 5000) then {player setVariable ["overall_distance", _am1]}; if (_am2 < 200) then {_ctrl2 ctrlSetText "200"; player setVariable ["object_distance",200]}; if (_am2 > 5000) then {_ctrl2 ctrlSetText "5000"; player setVariable ["object_distance",5000]}; if (_am2 > 200 && _am2 < 5000) then {player setVariable ["object_distance",_am2]}; if (_am3 < 50) then {_ctrl3 ctrlSetText "50"; player setVariable ["shadow_distance",50]}; if (_am3 > 300) then {_ctrl3 ctrlSetText "3000"; player setVariable ["shadow_distance",300]}; if (_am3 > 50 && _am3 < 300) then {player setVariable ["shadow_distance",_am3]}; [_am1,_am2,_am3] call fnc_distances; }; https://www.bilder-upload.eu/bild-69858e-1566135772.png.html //the error
  3. I want to change the text of an edit box, ctrlsettext and ctrlSetStructuredText doesnt work. Any Ideas, thanks!
  4. Smart Games

    CutRsc Problem

    It shows the ui to the killed unit and the killer, i think i know how to fix it 😄
  5. Smart Games

    MpEventHandler "mpkilled" trouble

    @killzone_kid, thank you, its working!
  6. If i use CutRsc the display is shown to every player. Is there any way to make cutrsc work for just a single player? Thanks
  7. Smart Games

    MpEventHandler "mpkilled" trouble

    I have the same problem..
  8. I added the following code to the init of an unit: this addMPEventHandler ["mpkilled",{[(_this select 0), (_this select 1)] call fnc_unitkill}]; I made a money and kill system and i dont want the player to get a reward for teamkilling, thats why i had the following idea: fnc_unitkill = { params ["_victime","_killer"]; if (side _victime == side _killer) then {} else { _money = _killer getVariable "money"; _kills = _killer getVariable "kills"; _exp = _killer getVariable "exp"; _killer setVariable ["money",_money + 100]; _killer setVariable ["kills",_kills + 1]; _killer setVariable ["exp", _exp + 100]; _lgk = _killer getVariable "longestkill"; _dst = _killer distance _victime; if (_dst > _lgk) then {_killer setVariable ["longestkill",_dst]}; }; }; But it dont work... I tried to call the function with this addMPEventHandler ["mpkilled",{[_this] call fnc_unitkill}]; and then.. fnc_unitkill = { _victime = _this select 0; _killer = _this select 1; if (side _victime == side _killer) then {} else { _money = _killer getVariable "money"; _kills = _killer getVariable "kills"; _exp = _killer getVariable "exp"; _killer setVariable ["money",_money + 100]; _killer setVariable ["kills",_kills + 1]; _killer setVariable ["exp", _exp + 100]; _lgk = _killer getVariable "longestkill"; _dst = _killer distance _victime; if (_dst > _lgk) then {_killer setVariable ["longestkill",_dst]}; }; }; doesnt work, too. If i only call it with this addMPEventHandler ["mpkilled",{[_this select 1] call fnc_unitkill}]; then... params ["_killer"]; _money = _killer getVariable "money"; _kills = _killer getVariable "kills"; _exp = _killer getVariable "exp"; _killer setVariable ["money",_money + 100]; _killer setVariable ["kills",_kills + 1]; _killer setVariable ["exp", _exp + 100]; _lgk = _killer getVariable "longestkill"; _dst = _killer distance _victime; if (_dst > _lgk) then {_killer setVariable ["longestkill",_dst]}; it works, but now you get a reward for killing your friends. I really need your help, thanks.
  9. I would like to upgrade my PC and have worked out 2 variants: current specs: - fx 8350 - 16gb 2166 cl9 ddr3 ram - rx 570 8gb variant 1) - i5 9600k - 16gb 2666 cl13 ddr4 - vega 56 variant 2) - i7 9700k - 16gb 3200 cl14 ddr4 (+ mainboard on both variants) whats the better one?
  10. Smart Games

    Dialog custom textsize

    Thank you
  11. I need a heading in my Dialog but the fonts i tried are too small. Any ideas? Thanks
  12. Smart Games

    Change text for UI ?

    thank you @Larrow
  13. Smart Games

    Change text for UI ?

    i forgot to change it, but that isnt the problem. I also tried it with findDisplay 123
  14. I´m trying to show the players [x,y,z] with an Ui. The problem? CtrlSetText doesn´t work! init.sqf: [] execVM "Gui\gui_functions.sqf"; cutRsc ["gui1","plain"]; description.ext: class RscTitles { #include "Gui\Gui1\Gui1.hpp" }; gui_functions.sqf: fnc_pos = { while {true} do { sleep 0.5; _display = findDisplay 123; _child = _display displayCtrl 10000; _child ctrlSetText format ["%1", getpos player]; }; }; Gui1.hpp: #include "CustomControlClasses.hpp" class Gui1 { idd = 12345; duration = 999999; class ControlsBackground { class Background { type = 0; idc = -1; x = safeZoneX + safeZoneW * 0.84375; y = safeZoneY + safeZoneH * 0.90925926; w = safeZoneW * 0.14739584; h = safeZoneH * 0.075; style = 0; text = ""; colorBackground[] = {1,1,1,1}; colorText[] = {0,0,0,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); onLoad = ""; }; }; class Controls { class T_1 { type = 0; idc = -1; x = safeZoneX + safeZoneW * 0.84791667; y = safeZoneY + safeZoneH * 0.92870371; w = safeZoneW * 0.04635417; h = safeZoneH * 0.04074075; style = 2; text = "Position:"; colorBackground[] = {0.7569,0.6353,0.298,0}; colorText[] = {0,0,0,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); }; class T_Pos { type = 0; idc = 10000; x = safeZoneX + safeZoneW * 0.90729167; y = safeZoneY + safeZoneH * 0.92870371; w = safeZoneW * 0.06614584; h = safeZoneH * 0.04074075; style = 0; text = "[0,0,1]"; colorBackground[] = {1,1,1,1}; colorText[] = {0,0,0,1}; font = "PuristaMedium"; sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1); onLoad = "[] spawn fnc_pos"; }; }; }; Any Ideas? Thanks 😄
×