Jump to content

terrence

Member
  • Content Count

    29
  • Joined

  • Last visited

  • Medals

Posts posted by terrence


  1. Thank You,

    I would like it to be the Letter O If that is possible, Thank You :)

    Great Tool by the way

    Go in to ADP\Functions\ADP_F_OpenPanel.sqf and go to line 9 where is says:

    if (_KeyCheck == "21") then //Checks if Y is Pressed

    and change "21" to the key code you want.

    You can put this in your adpint to find out which codes go to which keys:

    moduleName_keyDownEHId = (findDisplay 46) displayAddEventHandler ["KeyDown", "hint str _this;"];

    Note: I believe the second variable the code kicks out is the code


  2. Hi all

    I'm currently writing a basic scripting tutorial. To help get somebody who has never seen a sqf get to a point where their comfortable writing small sqf and functions on their own. I don't claim to be an expert at scripting but I feel I know enough to help somebody out. There are tons of pages of tutorials of scripting for Arma 2 and older but no real Arma 3 tutorials that Ive found. Ive noticed new players to scripting will shy away from anything that doesn't say Arma 3. I know I did in the beginning. Note I just found Mikie Boy tutorial its great but I kinda want to go a little more in depth with certain parts. This post isn't ment to promote my tutorial just to see what the community thinks :cool:

    My question is do you think this will be helpful to the community and what are your suggestions for: topics, what I should go in depth to, and what I should shy away from.

    Here is a link on what Ive started on.

    Note it is nowhere close to being finished. I plan to break it into about 10 parts for the basic section. Possibly going to indeterminate or advanced in the future depending on community support.

    If anybody with scripting experience that would like to help please send a pm


  3. Thanks Delta and Foxhound. Found the problem and will fix on next patch.

    If you would like for both of them to work or any other script that uses CfgFunctions before the patch this is what you do:

    Delete class CfgFunctions out of APD\DIALOG\DEFINES.HPP

    class CfgFunctions
    {
    class ADP
    {
    	class DialogControl
    	{
               #include "functions.hpp"
    	};
    };
    };

    and put this in your Description.ext

    class CfgFunctions
    {
    class ADP
    {
    	class DialogControl
    	{
               #include "ADP\Dialog\functions.hpp"
    	};
    };
    #include "taw_vd\CfgFunctions.hpp" //If your using TAW_VD
    };

    Making your description.ext looking something like this:

    #include "ADP\Dialog\defines.hpp"
    #include "ADP\Dialog\ADP.hpp"
    #include "taw_vd\dialog.hpp"  //If your using TAW_VD
    class CfgFunctions
    {
    class ADP
    {
    	class DialogControl
    	{
               #include "ADP\Dialog\functions.hpp"
    	};
    };
    #include "taw_vd\CfgFunctions.hpp"  //If your using TAW_VD
    };
    
    
    
    respawn = "BASE";
    respawndelay = 5;
    disabledAI = 1;
    respawnDialog = 1;
    respawnTemplates[] = {"MenuPosition"};
    saving=0;


  4. Architect's Debugging Panel V1.1

    @file Version: 1.1

    @file Name: Architect's Debugging Panel V11

    @file Author: THumbert

    Description:

    The Architect's Debugging Panel allows the user to:


    • Spectate any unit in the mission
    • Kill any unit in the mission
    • Teleport anywhere on the map
    • Enable Gode Mode
    • Open the Functions Viewer
    • Open the Config Viewer
    • Change View Distance Settings
    • Change Grass Quality Settings
    • Change Shadow Distance Settings
    • Spawn any weapon or item in Arma or your favorite Mod
    • Spawn any Vehicle in Arma or your favorite Mod
    • Spawn pretty much anything ie. Buildings, Signs, Lights
    • Displays all class of anything you spawn along with magazine class if applicable
    • ADP can watch up to 8 variables simultaneously
    • ADP has 3 Execute lines that can be executed locally, globally, or on the server

    Changelog:

    --------------------------------------------

    +Completely rewrote the spectate script.

    +Added Player information during spectating

    +Added an exit button "SPACE BAR" to ext spectating

    +Adjusted the time to 3 minutes but now you can exit anytime by pushing spacebar

    +Changed the Player list text to correspond with the player side

    +Adjusted hpp files to allow easier access of using multiple addons that use CfgFunctions

    +Added subclassed for Scrollbar

    +Changed install intructions

    +Other small improvements

    Download Link:

    Download Links

    Installation:

    Place ADP Folder and ADPInit in your mission directory

    PLACE THIS IN YOUR DESCRIPTION.EXT

    #include "ADP\Dialog\defines.hpp"
    #include "ADP\Dialog\ADP.hpp"
    class CfgFunctions
    {
    class ADP
    {
    	class DialogControl
    	{
               #include "ADP\Dialog\functions.hpp"
    	};
    };
    };

    if class CfgFunctions already exists in your description.ext then put

    	class ADP{class DialogControl{#include "ADP\Dialog\functions.hpp"};};

    in it. Like so:

    #include "ADP\Dialog\defines.hpp"
    #include "ADP\Dialog\ADP.hpp"
    class CfgFunctions
    {
    //
    //Whatever your other mods are
    //
    class ADP
    {
    	class DialogControl
    	{
               #include "ADP\Dialog\functions.hpp"
    	};
    };
    };

    --------------------------------------------

    PLACE THIS IN YOUR Init.sqf

    --------------------------------------------

    [] execVM "ADPInit.sqf";

    **IF RUNNING ON A SERVER PUT YOUR UID IN THE ADPInit.sqf!

    -------------------------------------------

    Bug Reports:

    Please let me know of any bugs @ http://offgaming.us/forums/viewforum.php?f=12&sid=c820be690b16


  5. Just a suggestion but you could get rid of the loop if you used a Respawn EventHandler like so:

    init.sqf

    if ((getPlayerUID player) in ["YOUR UID HERE USE COMMAS FOR DIFFERENT UIDS"]) then {
    execVM "admin/activate.sqf";
    player addEventHandler ["Respawn", {_this execVM "admin\activate.sqf"}];
    };

    and in the activate.sqf

    waitUntil {alive vehicle player};
    act = player addAction ["Tools",{execVM "tools.sqf";}];

    Should get rid of the double menus also : )


  6. I think I found the problem. I was trying to read playerxp as a array when it should have been a Scalar. Not sure why this wouldnt give me and error everytime but Ill do some testing and post my results

    Well that didnt fix it. I logged in and out 8 times and on the last one it didnt load my stats. But I relogged quickly and the load worked. Got two errors in the rpt:

    Error in expression < (_type == "NUMBER")) then { 
    _string = parseNumber _string;
    };
    };
    
    _string
    };
    
    >
     Error position: <parseNumber _string;
    };
    };
    
    _string
    };
    
    >
     Error parsenumber: Type Bool, expected String

    Error in expression <_key];
    _data = call compile _data;
    
    if((_data select 0)) then {
    _data select 1
    }>
     Error position: <_data select 0)) then {
    _data select 1
    }>
     Error Undefined variable in expression: _data
    Error in expression <NUMBER")) then { 
    _string = parseNumber _string;
    };
    };
    
    _string
    };
    
    iniDB_read =>
     Error position: <_string;
    };
    };
    
    _string
    };
    
    iniDB_read =>
     Error Undefined variable in expression: _string
    Error in expression <then {
    _type = _this select 3;
    _data = [_data, _type] call iniDB_Datarizer;
    };
    
    >
     Error position: <_data, _type] call iniDB_Datarizer;
    };
    
    >
     Error Undefined variable in expression: _data
    Error in expression < 
    _string = parseNumber _string;
    };
    };
    
    _string
    };
    
    iniDB_read = {
    private["_fil>
     Error position: <_string
    };
    
    iniDB_read = {
    private["_fil>
     Error Undefined variable in expression: _string
    Error in expression <_data, _type] call iniDB_Datarizer;
    };
    
    _data
    };
    
    iniDB_write = {
    private["_file>
     Error position: <_data
    };
    
    iniDB_write = {
    private["_file>
     Error Undefined variable in expression: _data


  7. First off just wanted to say thanks inidb works great 90% of the time but sometimes when a player joins who already has a db file looses all his progress everything is reset to 0. I think I kinda know where the bug is but have no idea how to fix it

    Server rpt

    Error in expression <_type == "ARRAY") then {
    _string = call compile _string;
    } else {
    if((_type == ">
     Error position: <compile _string;
    } else {
    if((_type == ">
     Error compile: Type Bool, expected String

    I believe its referring to the inidb pbo init file more specifically the iniDB_Datarizer function

    iniDB_Datarizer = {
    private["_string", "_type"];
    _string = _this select 0;
    _type = _this select 1;
    
    if(_type == "ARRAY") then {
    	_string = call compile _string;
    } else {
    	if((_type == "SCALAR") || (_type == "NUMBER")) then { // "NUMBER" is less confusing for new folks
    		_string = parseNumber _string;
    	};
    };
    
    _string
    };

    This is my load Function

    abc_LoadplayerPos = {
       private ["_loadpos"];
       _loadpos = _this select 0;
       _Profile = format["%1", getPlayerUID _loadpos];
    _SavXP = [_Profile, "playerData", "playerxp", "ARRAY"] call iniDB_read;
    if (isNil"_SavXP") exitWith 
    {
    hint formattext ["%1 we could not find your save Data, Use the noticeboard in your base to get the Game and Server info! ", _loadpos];
    _loadpos setVariable ["playerxp", 0, true];
    };
    _loadpos setVariable ["playerxp", _SavXP, true];
    hint formattext ["%1 your save data has successfully been loaded", _loadpos];
    };

    and my save function

    if(isDedicated) then {
    while{true} do {
    sleep 90;
    ["","ASH_Function"] spawn BIS_fnc_MP;
    {
    	if(isPlayer _x) then {
    
    _playerxp = _x getvariable ["playerxp", 0];
    _Profile = format["%1", getPlayerUID _x];
    [_Profile, "playerData", "position", position _x] call iniDB_write;
    [_Profile, "playerData", "Playername", name _x] call iniDB_write;
    [_Profile, "playerData", "playerxp", _playerxp] call iniDB_write;
    /* //Not need for this mission type
    [_Profile, "playerData", "magazines", magazines _x] call iniDB_write;
    [_Profile, "playerData", "weapons", Weapons _x] call iniDB_write;
    [_Profile, "playerData", "weapons1", SecondaryWeapon _x] call iniDB_write;
    [_Profile, "playerData", "vest", vest _x] call iniDB_write;
    [_Profile, "playerData", "uniform", uniform _x] call iniDB_write;
    [_Profile, "playerData", "headgear", headgear _x] call iniDB_write;
    [_Profile, "playerData", "items", items _x] call iniDB_write;
    */	
    		};
    	} forEach allUnits;
    	["","ASCH_Function"] spawn BIS_fnc_MP;
    };
    };

    Any help at all would be greatly appreciated. If you need any more info please let me know.

    Thanks


  8. Looking forward to a public release in the near future :)

    Command and Control Changelog v0.1
    *	Fixed mortar sectors dominance issue
    *	Fixed mortar sectors points
    * 	Rewrote the XP requirements for all of the Ranks
    *	Fixed - Put Civilian Vehicles in the levels
    *	Fixed - Give Mortars more shells on reCapture
    *	Fixed -	Put in hints about score limit and flagpoles
    *	Fixed -	Change the deserted vehicle distance
    *	Fixed -	Get Database working with XP
    *	Fixed - Give players points for killing
    *	Fixed - Rewrote the missions sqfs to make it easier to change rank req and max score
    *	Fixed -	Added hint for Server save
    
    *	Added - PowerPlant level
    *	Added - Pyrgos Level
    
    Known Bugs
    -	Fix Halo Jumps killing Players  			Disabled Halo for now
    -	Vehicles Respawning Bugs					Waiting for the Module to be fixed	


  9. Thanks for the suggestions guys. Correct me if I'm wrong here but I thought it was best for the server to assign the mp event handlers to each player. Due to the fact that if each player assigns his own event handler when it's fired all clients including the server exec the code, so if you have 4 clients connected and the dedicated server the code would be exec 5x. I haven't been able to test this extensively due to my work schedule. But with my limited testing I noticed I revived double the "Xp" points when it was just me on a dedicated server with an AI. When I used the client to assign the variables. Guessing because my client would exec the code and so would the server. I'll do some more research tomorrow, but for now I'm headed to bed. again thanks for the suggestions:)


  10. Hello,

    Last night I thought I got my MPKilled script to work on my TvT server, but the more I looked at the script the more I thought this wont work for JIP. :confused: I searched for over an hour on the fourms and google but couldnt find a answer.

    This is My Init.sqf

    if (isServer) then {
    {
    _x addMPEventHandler ["MPKilled", {_this call ADDXP_Function}];
    } forEach allUnits;
    };
    
    
    ADDXP_Function = {
    				if (isServer) then 
    					{
    					_victim = _this select 0;
    					_killer = _this select 1;
    					if (_victim != _killer) then 
    						{
    						_tempxp = _killer getVariable ["playerxp", 0];
    						_killer setVariable ["playerxp", (_tempxp) + 5, true];
    						};	
    					};
    };

    The way I understand it is with this script the server is going to only assign eventhandlers to the players that are in the match at the beginning.

    Im still pretty new to scripting for mp missions so if somebody doesn't mind just letting me know if im right or wrong about this issue. Thanks!

    ---------- Post added at 01:28 ---------- Previous post was at 23:58 ----------

    Well its confirmed it doesnt assign to players who JIP. Does anybody know how I would have the server assign a MPKILLED EH to a JIP player?

    ---------- Post added at 02:28 ---------- Previous post was at 01:28 ----------

    The only thing I can think of now is write a script for the server that checks to see if any new players have joined and if so remove all players EH and reassign them?

    ---------- Post added at 04:14 ---------- Previous post was at 02:28 ----------

    Will do some testing after work this is the simple script I came up with

    while {isServer} do {
    sleep 30;
    {
    _x removeAllMPEventHandlers "MPKILLED"; 
    } forEach allUnits;
    {
    _x addMPEventHandler ["MPKilled", {_this call ADDXP_Function}];
    } forEach allUnits;	
    };

    I know this is probably a terrible way to do it but its all I can think of.

×