Jump to content

ARCH93

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About ARCH93

  • Rank
    Private First Class

Recent Profile Visitors

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

  1. Larrow, Glad your doing better man! Seems to be working for all clients using: if (hasInterface) then { -----------> This is what I added, seems to be working for clients now instead of just the host. params ["_player", "_didJIP"]; waitUntil{ !isNull call BIS_fnc_displayMission }; "playerRatingLayer" cutRsc [ "playerRating", "PLAIN" ]; _player addEventHandler ["HandleRating", { params ["_unit", "_rating"]; _rating call TAG_fnc_updatePlayerRating; }];
  2. I’m sorry to bring up a discussion that I thought was closed but, it turns out whoever hosts can see the “Money:” but whoever joins can’t. I’m going to do some digging to see what’s wrong but thought I’d ask here as well I really appreciate the help with all this
  3. Thank you! Got it working. Appreciate both of you for helping me
  4. Larrow, glad your still here man. Grateful for your work. So it's getting closer, this is what I have so far: initPlayerLocal.sqf waitUntil{ !isNull call BIS_fnc_displayMission }; "playerRatingLayer" cutRsc [ "playerRating", "PLAIN" ]; _player = c1; _player addEventHandler ["HandleRating", { params ["_unit", "_rating"]; _rating call TAG_fnc_updatePlayerRating; }]; (I added _player = c1; after it was giving me an error with an undefined variable. I assume I would go ahead and give names to all playable units here?) fn_updatePlayerRating.sqf uiNamespace getVariable "playerRatingText" ctrlSetText format ["MONEY: %1", _this + rating player]; First thing, The "MONEY:#" is updating in real time; however any changes other than killing enemies, like picking up items or using VASS to "buy" items, do not update automatically. ex. I start the mission by killing an opfor unit: "MONEY:0" --changes to---> "MONEY:200" I go to my VASS shop that uses Player Rating as currency it shows $200 matching my current rating. I purchase a random weapon that costs $1 for testing. cutrsc rating still = "MONEY:200" VASS shows updated rating of $199. Spawn another opfor unit and kill that unit so now it updates giving me "MONEY:399" The same thing happens for me when I use: Trigger: Condition: "CUP_item_Money" in UniformItems player; Activation: player addRating 2000; player removeItem "CUP_item_Money" edit:It's only after killing the opfor unit does it show the extra "2000" So far Rating changes only on killing hostile units. Second, I noticed an error when I first open the test mission: '... ctrlSetText format[ "MONEY: %1", _this |#|+ rating player ];' Error +: Type Control, expected Number,Array,String,Not a number
  5. OK well I was wrong, it's working but the number is off. For every regular infantry kill is equal to +200, https://community.bistudio.com/wiki/ArmA:_Armed_Assault:_Rating_Values However on the first kill it doesn't change the variable; only on the second kill does it show MONEY:200; where instead it should show MONEY:400 Almost there! Couldn't make it this far without this community. edit: So its only the first kill that isn't counted; it seems to be counting consistently after that
  6. Got that backwards, right side hint, left side cutrsc
  7. Thank you! Appreciate both of you taking the time to look into this. Still having issues though, I will share below of what I have for the sake of clarity: Description.ext #include "ui\baseDefines.hpp" #include "VASS\gui\cfgGUI.hpp" class RscTitles { #include "ui\playerStatsUI.hpp" }; class CfgFunctions { #include "functions\playerStatsFunctions.hpp" #include "VASS\CfgFunctions.hpp" }; initPlayerLocal.sqf waitUntil{ !isNull call BIS_fnc_displayMission }; "playerRatingLayer" cutRsc [ "playerRating", "PLAIN" ]; params ["_player", "_didJIP"]; _player addEventHandler ["HandleRating", { params ["_unit", "_rating"]; call TAG_fnc_updatePlayerRating;; }]; ui\baseDefines.hpp #define CT_STATIC 0 #define ST_LEFT 0x00 #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_H (GUI_GRID_HAbs / 25) #define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) class RscText { deletable = 0; fade = 0; access = 0; type = CT_STATIC; idc = -1; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; text = ""; fixedWidth = 0; x = 0; y = 0; h = 0.037; w = 0.3; style = ST_LEFT; shadow = 1; colorShadow[] = {0,0,0,0.5}; font = "RobotoCondensed"; SizeEx = GUI_TEXT_SIZE_MEDIUM; linespacing = 1; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; }; ui\playerStatsUI.hpp class playerRating { idd = -1; fadein = 0; fadeout = 0; duration = 1e10; class controls { class rank : RscText { x = 0; //change this to position text on screen y = 0; //change this to position text on screen w = 0.12 * safeZoneW; h = 0.02 * safeZoneH; text = "Rating: "; onLoad = "uinamespace setVariable [ 'playerRatingText', _this select 0 ]; _this select 0 call TAG_fnc_updatePlayerRating"; }; }; }; functions\playerStatsFunctions.hpp class ui { tag = "TAG"; class playerInfo { file = "functions"; class updatePlayerRating {}; }; }; functions\fn_updatePlayerRating.sqf uiNamespace getVariable "playerRatingText" ctrlSetText format ["MONEY: %1", rating player]; In my example mission; the right side (as you guys know) is the Cutrsc. The left is a hint I call using debug: onEachFrame {hintSilent format ["MONEY: %1", rating player]}; As I kill an opfor unit; the right side stays MONEY:0 while the hint updates to MONEY:200
  8. Harzach! Thank you! So I looked in "cutRsc and Updating Variables" I also found this: https://forums.bohemia.net/forums/topic/207620-show-each-players-rank-on-screen-in-dedicated-server/ I tried to mimic Larrow's code for my own cutRsc: Description.ext #include "ui\baseDefines.hpp" #include "VASS\gui\cfgGUI.hpp" class RscTitles { #include "ui\playerStatsUI.hpp" }; class CfgFunctions { #include "functions\playerStatsFunctions.hpp" #include "VASS\CfgFunctions.hpp" // this is from VASS (Virtual Arsenal Shop System) }; iniPlayerLocal.sqf "playerRatingLayer" cutRsc [ "playerRating", "PLAIN" ]; baseDefines.hpp #define CT_STATIC 0 #define ST_LEFT 0x00 #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_H (GUI_GRID_HAbs / 25) #define GUI_TEXT_SIZE_MEDIUM (GUI_GRID_H * 1) class RscText { deletable = 0; fade = 0; access = 0; type = CT_STATIC; idc = -1; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; text = ""; fixedWidth = 0; x = 0; y = 0; h = 0.037; w = 0.3; style = ST_LEFT; shadow = 1; colorShadow[] = {0,0,0,0.5}; font = "RobotoCondensed"; SizeEx = GUI_TEXT_SIZE_MEDIUM; linespacing = 1; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; }; playerStatsUI.hpp class playerRating { idd = -1; fadein = 0; fadeout = 0; duration = 1e10; class controls { class rank : RscText { x = 0; //change this to position text on screen y = 0; //change this to position text on screen w = 0.06 * safeZoneW; h = 0.02 * safeZoneH; text = "MONEY: "; onLoad = "uinamespace setVariable [ 'playerRatingText', _this select 0 ]; _this select 0 call TAG_fnc_updatePlayerRating"; }; }; }; playerStatsFunctions.hpp class ui { tag = "TAG"; class playerInfo { file = "functions"; class updatePlayerRating {}; }; }; fn_updatePlayerRank.sqf uiNamespace getVariable "playerRatingText" ctrlSetText format[ "MONEY: %1", player rating ]; I was able to use his original code and in poking around was able to get text with "MONEY:0" by only changing: [ "Rank: %1", rank player ]; to ------> [ "MONEY: %1", player rating ]; in the fn_updatePlayerRank.sqf However I noticed when killing NPC's it wouldn't update the rating in the text "MONEY:0". Right now the above code is what I have after fiddling with it.
  9. I’ve been using “Player Rating“ as a currency for a game mode for me and my friends, (using VASS), the below code in my ini.sqf to show each players “Money”: onEachFrame {hintSilent format ["MONEY”: %1", rating player]}; So every time they kill an enemy unit or pick up certain items their Rating/Money changes. However I noticed “Cutrsc”; I’m scratching my head trying to figure out the best way to display this info so I can use the “hint” system for other things. Any help is appreciated! Thank you.
  10. I’m using this code to show the current player rating as they pick up money or kill enemies: onEachFrame {hintSilent format ["RATING: %1", rating player]}; However, has anyone tried showing player rating using GUI or HUD? If you have do you mind showing the Scripts/Codes? P.s. Thank you so much for VASS, it’s amazing!
  11. Hi all, First just wanted to say I'm new to the Forums, and excited to learn from those with experience. Now for my question; usually I like to figure out issues with scripting or editing on my own, since these forums have plenty of information to search through but this has been giving me headaches so far. I have started a multiplayer mission and intend to use the amazing HG Simple Shops. So far everything was working great until I decided to try to use a database to save player inventory. I am using Host Havoc as my dedicated and using phpMyAdmin to store information with the sql that came along with HG. I'm using extDB3 (that was provided with HG) in my Host Havoc files as @extDB3. When I host and test nothing is saved for the player inventory, (it is reset every time), however money, vehicles, and everything else has persistence. Details Below: Host Havoc--- Server Mods: @extDB3 File Manager: I have @extDB3 with all its files directly in the directory, I also have tbbmalloc_x64.dll, and tbbmalloc.dll there as well. ------- extdb3-conf.ini: I have changed the below to match(?) the info provided by phpMyAdmin. IP = 127.0.0.1 (Does this need to stay the same? Do I change this to the Server ip? I am using the addon provided by Host Havoc) Port = 3306 Username = changeme (These I have changed, they were straight forward enough). Password = changeme ------- HG Simple Shops---- /* SAVING */ (This is what I have currently, "changeme" is simply a plasholder nstead of my real database name.) savingMethod = "extDB"; extDBDatabase = "changeme"; extDBProtocol = "SQL_CUSTOM"; extDBCustomFile = "custom.ini"; --------- phpMyAdmin-- I simply copied and pasted the HG_SimpleShops.sql to create the tables here, I have noticed when I log in and out nothing is added. again, changeme is a placeholder for my real id. CREATE DATABASE IF NOT EXISTS `changeme` DEFAULT CHARACTER SET utf8mb4; -- ! IMPORTANT ! -- USE `changeme`; -- ! IMPORTANT ! -- ---------------- So any help is greatly appreciated, let me know if more info is needed. Thanks.
×