Jump to content
soundblaster

TFAR Classname is wrong?

Recommended Posts

Hello Folks.

 

Recently I've started implementing TFAR to my mission file. Currently there is a store in my missionfile which sells the TFAR handheld radio's but now I have one problem. The person that buy's the radio for example "tf_anprc152" will be automatically replaced with a different version of radio for example the "tf_anprc152_1". This is a issue for me because now I cannot predict what class name the TFAR item will have because it changes every time. Sometimes it is "tf_anprc152_2" or "tf_anprc152_4"...

I've noticed more players have this issue how can I solve this problem? I am calling the item like this in my script _i = ["tf_anprc152"]; . What should I do is there a way of solving this where the store item can be 1 forced class name instead of something dynamic?

 

I hope this made sense...

Share this post


Link to post
Share on other sites

Hm, I've seem to fix it. I made the store force selling "tf_anprc152_1". I don't know if this will cause interference with other TFAR features.

Share this post


Link to post
Share on other sites

You'll probably have to iterator through the assigned items of the player and use inString to check the classes (I'm assuming the TFAR radios are returned in assignedItems).

 

Something like this:

_radio = [];

{
	if (["tf_anprc152",_x] call BIS_fnc_inString) then
	{
		_radio pushBack _x;
	};
} count assignedItems player;

If you sell just the "tf_anprc152_1", every player will have the same radio ID, therefore, any time someone changes their settings/channel/frequencies, it will change everyone elses along with it.

Share this post


Link to post
Share on other sites

This happens because the TFR mod is  giving for every players unique radio .

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

×