ADKgamers

Custom Functions Issue

6 posts in this topic

hello,
im having a issue with the custom functions for infistar.

This is what we have atm
 

class CfgCustomFunctions {
    class custom1 {
        type = 0;
        name = "Event Marker";
        code = "if(isNil 'adk_marker_num')then{adk_marker_num = 0;adk_admin_marker_array = [];};_circle = createMarker [format['ADK_Admin_%1',adk_marker_num], (getPos player)];_circle setMarkerColor 'ColorRed';_circle setMarkerShape 'ELLIPSE';_circle setMarkerBrush 'Solid';_circle setMarkerSize [150,150];_dot = createMarker [format['ADK_Admin_Dot_%1',adk_marker_num], (getPos player)];_dot setMarkerColor 'ColorBlack';_dot setMarkerType 'mil_dot';_dot setMarkerText 'Admin Event';adk_admin_marker_array = adk_admin_marker_array + [[format['ADK_Admin_%1',adk_marker_num],format['ADK_Admin_Dot_%1',adk_marker_num]]];adk_marker_num = adk_marker_num + 1;";
    };
    class custom2 {
        type = 0;
        name = "Delete Event Marker";
        code = "{if(((getMarkerPos (_x select 0)) distance (getPos player)) < 100)then{{deleteMarker _x;deleteMarkerLocal _x;}forEach _x};}forEach adk_admin_marker_array;";
    };
    class custom3 {
        type = 0;
        name = "Event Raceway";
        code = "execVM '\adk_chernarus\Admin_Events\ADK_Event_Raceway.sqf';";
    };
    class custom4 {
        type = 0;    // targets selected player (_this)
        name = "Event DeathMatch";
        code = "execVM '\adk_chernarus\Admin_Events\ADK_Event_Deathmatch.sqf';";
    };
    class custom5 {
        type = 0;    // just execute
        name = "custom5: type = 0";
        code = "systemChat 'custom5';";
    };
};

The first 2 Custom Class's Work perfectly,

the ones were having issues with are
Custom 3 and 4

we cant seem to find why it work run that command, running the same exec via adminconsole works fine.

were at a loss.

Thanks,
Gingergod

Share this post


Link to post
Share on other sites

Because of this

https://community.bistudio.com/wiki/Arma_3_Startup_Parameters#Developer_Options

-filePatching needs to be set to 2 for that

anyways I would recommend you to put the .sqf files into your mpmission

 

put the files into your mpmission init.sqf and then do something like:

ADK_Event_Raceway = compileFinal preprocessFileLineNumbers 'ADK_Event_Raceway.sqf';
ADK_Event_Deathmatch = compileFinal preprocessFileLineNumbers 'ADK_Event_Deathmatch.sqf';


for the custom cfg
    class custom3 {
        type = 0;
        name = "Event Raceway";
        code = "[] spawn ADK_Event_Raceway;";
    };
    class custom4 {
        type = 0;
        name = "Event DeathMatch";
        code = "[] spawn ADK_Event_Deathmatch;";
    };

 

Share this post


Link to post
Share on other sites
Advertisement
17 minutes ago, infiSTAR said:

Because of this

https://community.bistudio.com/wiki/Arma_3_Startup_Parameters#Developer_Options

-filePatching needs to be set to 2 for that

anyways I would recommend you to put the .sqf files into your mpmission

 


put the files into your mpmission init.sqf and then do something like:

ADK_Event_Raceway = compileFinal preprocessFileLineNumbers 'ADK_Event_Raceway.sqf';
ADK_Event_Deathmatch = compileFinal preprocessFileLineNumbers 'ADK_Event_Deathmatch.sqf';


for the custom cfg
    class custom3 {
        type = 0;
        name = "Event Raceway";
        code = "[] spawn ADK_Event_Raceway;";
    };
    class custom4 {
        type = 0;
        name = "Event DeathMatch";
        code = "[] spawn ADK_Event_Deathmatch;";
    };

 

Unrelated to this, but any ideas why Object addaction or addplayer action does not work with infistar and exile? I can share code here once i get home.

Share this post


Link to post
Share on other sites
Quote

CAP = "false";        /* Check Actions Plr - "Actions: xxx/xxx possible scroll menu hack (or you added custom actions..)" */

maybe? :)

Share this post


Link to post
Share on other sites
22 hours ago, ADKgamers said:

hello,
im having a issue with the custom functions for infistar.

This is what we have atm
 


class CfgCustomFunctions {
    class custom1 {
        type = 0;
        name = "Event Marker";
        code = "if(isNil 'adk_marker_num')then{adk_marker_num = 0;adk_admin_marker_array = [];};_circle = createMarker [format['ADK_Admin_%1',adk_marker_num], (getPos player)];_circle setMarkerColor 'ColorRed';_circle setMarkerShape 'ELLIPSE';_circle setMarkerBrush 'Solid';_circle setMarkerSize [150,150];_dot = createMarker [format['ADK_Admin_Dot_%1',adk_marker_num], (getPos player)];_dot setMarkerColor 'ColorBlack';_dot setMarkerType 'mil_dot';_dot setMarkerText 'Admin Event';adk_admin_marker_array = adk_admin_marker_array + [[format['ADK_Admin_%1',adk_marker_num],format['ADK_Admin_Dot_%1',adk_marker_num]]];adk_marker_num = adk_marker_num + 1;";
    };
    class custom2 {
        type = 0;
        name = "Delete Event Marker";
        code = "{if(((getMarkerPos (_x select 0)) distance (getPos player)) < 100)then{{deleteMarker _x;deleteMarkerLocal _x;}forEach _x};}forEach adk_admin_marker_array;";
    };
    class custom3 {
        type = 0;
        name = "Event Raceway";
        code = "execVM '\adk_chernarus\Admin_Events\ADK_Event_Raceway.sqf';";
    };
    class custom4 {
        type = 0;    // targets selected player (_this)
        name = "Event DeathMatch";
        code = "execVM '\adk_chernarus\Admin_Events\ADK_Event_Deathmatch.sqf';";
    };
    class custom5 {
        type = 0;    // just execute
        name = "custom5: type = 0";
        code = "systemChat 'custom5';";
    };
};

The first 2 Custom Class's Work perfectly,

the ones were having issues with are
Custom 3 and 4

we cant seem to find why it work run that command, running the same exec via adminconsole works fine.

were at a loss.

Thanks,
Gingergod

ok thanks man, will give that a shot, any idea how to make the edits toggle? so spawn in on "enable" and delete on "disable"?

Share this post


Link to post
Share on other sites
On 1/3/2017 at 5:24 PM, infiSTAR said:

maybe? :)

Yea even with this it doesnt work, it works fine in editor but not in the server . 

Here is the code that is in the mod code, loaded server and client side, using mission.sqm to call the module that has this code.

 

http://pastebin.com/PeMReSqN

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.