Jump to content

Col. Ben Sherman

Member
  • Content Count

    58
  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

1 Follower

About Col. Ben Sherman

  • Rank
    Lance Corporal

Recent Profile Visitors

1026 profile views
  1. Somehow I managed to get it to work, using CBA I managed to split the event handles both client and headless client. It seems silly but I got no clue why it didn't work before and adjusting it to this it works just fine. Old code (description.ext) class Extended_Hit_EventHandlers { class All { hit = "_this call alive_fnc_handleHit;"; }; }; class Extended_Killed_EventHandlers { class All { killed = "_this call alive_fnc_handleKill;"; }; }; class Extended_FiredBIS_Eventhandlers { class CAManBase { fired = "_this call alive_fnc_handleFired;"; }; }; class Extended_Respawn_Eventhandlers { class CAManBase { respawn = "_this call alive_fnc_handleRespawn;"; }; }; New code (initPlayerLocal.sqf) if !(hasInterface or isServer) then { ["All", "Hit", {_this call custom_fnc_handleHit;}] call CBA_fnc_addClassEventHandler; ["All", "Killed", {_this call custom_fnc_handleKill;}] call CBA_fnc_addClassEventHandler; } else { ["CAManBase", "Fired", {_this call custom_fnc_handleFired;}] call CBA_fnc_addClassEventHandler; ["CAManBase", "Respawn", {_this call custom_fnc_handleRespawn;}] call CBA_fnc_addClassEventHandler; };
  2. Very good idea, never thought about that the problem I have now is that everything I add to the function that is being called through initPost is giving errors even a simple one such as diag_log format["Assigning Events to data: %1", name _this]; // Giving this error, Error in expression < format["Assigning Events to data: %1", name _this]; diag_log format["Assigning Events to data: %1", name player]; // Works but only outputs the HC and not the rest of the players/units spawned on the map Edit: Figured out the problem, the data transferred ended up in an array
  3. So I've kinda gone through this process and for some reason can't seem to get it to work completely especially since my entire mission is dynamic I wonder if there is a way for me to loop through NPC/AI in which I can assign a variable to them and assign the data at that point instead. Does anyone have any clue? Maybe something like this would work? (Code is just a concept, not sure if the spawn function keeps looping or not) [] spawn { if (!hasInterface) then { { if (local _x && (_x getVariable "handlersSet" == true || isNull _x getVariable "handlersSet")) then { [_x,["killed", {[[_this,(_this select 1)],'FN_HandleKillFunctionHere',false,false] call BIS_fnc_MP}]] remoteExec ["addEventHandler",0,true]; _x setVariable ["handlersSet", true, true]; }; } forEach allUnits; }; };
  4. You wouldn\t maybe know if there is a way to inject that as my AI's are dynamic, mostly through Zeus but CQB is managed through the ALiVE mod. Otherwise thanks for the help, not sure how I will do this as I use a mod to transfer the AI from Zeus to HC.
  5. Hi there, I've pretty much just got into headless client and I wonder if there is a way for event handlers to figure out that this guy killed this AI, I had this before and if they're spawned with Zeus they work just fine but when I use headless client it seems it doesn't track the kills. Below you can find how their setup so far. description.ext class Extended_Hit_EventHandlers { class CAManBase { hit = "_this call fnc_handleHit;"; }; }; class Extended_Killed_EventHandlers { class CAManBase { killed = "_this call fnc_handleKill;"; }; }; class Extended_FiredBIS_Eventhandlers { class CAManBase { fired = "_this call fnc_handleFired;"; }; }; class Extended_Respawn_Eventhandlers { class CAManBase { respawn = "_this call fnc_handleRespawn;"; }; }; fn_handleKill.sqf params ["_unit", ["_instigator", objNull], "_instigator"]; if ((isNull _instigator) || {_instigator == _unit}) then { private _aceSource = _unit getVariable ["ace_medical_lastDamageSource", objNull]; if ((!isNull _aceSource) && {_aceSource != _unit}) then { _instigator = _aceSource; }; }; if ((!isNull _instigator) && {!(_instigator isKindof "CAManBase")}) then { _instigator = effectiveCommander _instigator; }; if (_instigator == _unit) exitWith { _instigator setVariable ["deaths", (_instigator getVariable "deaths") + 1, true]; } else { _instigator setVariable ["kills", (_instigator getVariable "kills") + 1, true]; };
  6. Hi there, so lately I've had issues on my arma 3 server, all maps that I try none of them are loading in game. The default map works just fine and loads perfectly, the second mission file completely flips out, when I receive the mission file I stops all of the sudden somewhere from 0 - 100% in which no one else can join the server, it's only on that mission file or I should say any mission file besides the default one I have. The statistics on the default map is about 6gb in ram for example, once the server freezes at the receiving mission file it flips out and jump up to 20gb and maxes my ram up to 95%. I've tried over 8 different maps so far and I don't know what is going on anymore. Here is the rpt log: https://pastebin.com/9Z3ePXr1 (Yes I know I miss spelled the -autoinit doesn't matter about that) Edit: turns out it was me adding to much storage via ACE on some vehicles.
  7. Hi there, for some reason when I use the respawn module on my mission it always spawns an extra random location to it, doesn't matter how many modules I add or not there is always a random location on all my missions. Is there a fix for this issue as it's pissing me off, like my whole mission is on one side of the map and this random location is in the middle like people are spawning at the wrong location, help!
  8. Hi there, I'm not sure if this is even possible kinda the reason I'm writing this message, so what I'm looking for is if it's possible to somehow call a function from in-game to set the server password, for example "password123" call BIS_fnc_setServerConfig; just as an example, anyone got any clue if this is possible?
  9. Col. Ben Sherman

    Virtual Arsenal Unable To Load Loadouts

    Unfortunately, that didn't help. Tried without any TFR radio, both small and backpack no difference. The fun thing is that I can load the loadout through the debug if I run the function to load it. EDIT: Nvm turns out I when I respawned I was given a new small radio removing it resolved the issue. now my only concern is why it worked before I reinstalled my PC?
  10. Col. Ben Sherman

    Virtual Arsenal Unable To Load Loadouts

    I am, but if that would be the problem how come just me and my buddy have this problem on my server out of 30 other people? I'll try it and I'll get back to you. Thanks for the help so far!
  11. Hi there, The past hours I've been googling for a solution to this and for some reason every topic I see just died or people aren't willing to share their fixes. I've just reinstalled my computer installed everything I needed to join my server again and for some reason now I'm unable to load stored loadouts, I've tried several fixes, for example, someone stated it was because my profile was in read-only, I've ensured all files and folders aren't in read-only mode (ArmA 3 and ArmA 3 - Other Profiles) none of them have read-only mode activated. Someone else stated that it was because I used items that no longer existed such as mods that have been deactivated, but I don't see how that would be a problem as this happens literally once I save my loadout and then go back into the arsenal after and want to load it. I had a friend that had this exact same problem as me not too long ago, although his issue still remains. Someone please share your fixes if you have any, or share your ideas and suggestions because this is extremely frustrating that I'm not able to load my gear.
  12. Col. Ben Sherman

    CBA - Community Base Addons - ARMA 3

    So I have some issues with getting the event handlers to work, and I also get this warning in my RPT log. WARNING: Usage of deprecated CBA_fnc_addLocalEventHandler If I run my server locally the event handlers fires up, but if I run my server on my dedicated box the event handlers aren't running at all ["CAManBase", "Hit", {_this call test_fnc_handleHit;}] call CBA_fnc_addClassEventHandler; test_fnc_handleHit only contains a simple hint function to see if it's working or not Anyone got any ideas whats wrong with it?
  13. Col. Ben Sherman

    EventHanlder being triggered for everyone

    It's added once the database is loaded, so first time it's calling the database staff is from initPlayerLocal.sqf and then when the callback is received it applies the EH's to the player I assume since it's done with "player addEventHandler", but it's its local only why is the EH giving my player other players stuff, or do I have to like add the EH for the server somehow and then check if like the source is the player and then make a call so that the player increases his counts? I'm not really understanding the local part, like how would I make it so that it's done per player if that's the case. So that the player actually gets the correct data. I'm so confused. Like I don't know too much about arma scripting, only like the basics of it. I'm surprised I actually got the database going xD so the more info I get the more I'll understand it xD. Thanks for all the quick replies though.
  14. Hi there, I have a question when it comes to eventhandlers. As I'm currently trying to track peoples statistics such as shots fired, shots hit etc. But for some reason if my friend shots I get's his statistics on my player which I'm not 100% on how to fix. This is the code right now player addEventHandler ["Fired", { shotsfired = shotsfired + 1; }]; I tested outputting the values into a hint format once the event is happening.
  15. Col. Ben Sherman

    Questions, looking for a few functions

    Thanks, I'll check it out :) Currently I don't have anything setup as I don't know how to fetch the data that I need AKA kills, deaths etc. What I use is a server side addon which data is sent to from that server side addon it sends data to the database through @extDB works some what the same as Altis Life missions EDIT: I also read more about the issue and I was kinda wrong it's not related to the ALiVE module rather than ACE3, so apparently the kills tracking or scoreboard is always 0 due to ACE3, not sure how to fix that. All though I don't really care about the in-game scoreboard as I need to be able to send the data to the server to store it in the database so that way it can be viewed from my website panel.
×