Jump to content
Sign in to follow this  
daniellarusso

need help with functions

Recommended Posts

hey,

 

i'm trying to write a litte mod for my team.

the mod should provide the ability to add a menu to an object where you can select your loadout

 

for example I add [player] call Beans_fnc_addLoadoutMenu; into the objects ini field.

But nothing happens.

 

My folder structure:

@BeansMod/

  • mod.cpp

@BeansMod/addons/Beans_Loadout/

  • data/
  • functions/
  • $PREFIX$
  • config.cpp

@BeansMod/addons/Beans_Loadout/functions/

  • fn_addLoadoutMenu.sqf

 

config,cpp

class CfgFunctions
{
	tag = "Beans";
	
	class Functions
	{
		file = "functions";
		class addLoadoutMenu {};
	};
};

fn_addLoadoutMenu.sqf

/*
	File: fn_addLoadoutMenu.sqf
	Author: Daniel Larusso

	Description:
	Adds the loadoutmenu
*/

private ['_unit'];

_unit = _this select 0;

_unit addAction ['<t color="#990d03">-- Lehrgangteilnehmer --</t>', ''];
_unit addAction ['Schuetze', ''];
_unit addAction ['AT-Schuetze', ''];

I don't know where I've failed, so maybe you guys can help me

 

thanks,

daniel

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×