Jump to content
wh1ten3ss

remoteExec problms (cant sand right message)

Recommended Posts

so, the main problem contains in this code
 

TABLET_FNC_GETPLAYERSARRAY =
{
{
if (isPlayer _x && alive _x) then {
	
	_index = lbAdd [14881, name _x];
	_data = lbSetData [14881, _index, name _x];

	//_index = lbAdd [14881, name _x];
	//_data = lbSetData [14881, _index, name _x];
	lbSetTooltip [14881, _index, name _x];
};
}forEach allUnits;
while (true) do {
_index = lbCurSel 14881;
_target1 = lbdata [14881, _index];
sleep 0.1;
}; 
};

MAIL_FNC_SENDLOCAL = {




_message = ctrlText 14883;
_text_admin_Err = format ["<t color='#F68617'  >Ошибка блять сука не видит чела ебанного</t><br />"];	
if (_target1 == "") exitWith {hint parseText (_text_admin_Err);};
//_target1 = missionNamespace getVariable ( _target1 );
_sender = player;


_messagedisplay = parsetext format ["<t size='2' align ='center' color='#ffcc00'>Новое сообщение</t><br></br><br></br>
<t size='1' align ='left' color='#00cc00'>Кому:</t><t align ='left'> Вам</t><br></br>
<t size='1' align ='left' color='#00cc00'>От:</t> <t align ='left'> %1</t><br></br><br></br>
<t size='1' align ='left' color='#00cc00'>Сообщение:</t><br></br>
<t size='1' align ='left'>%2</t>", name player, _message];
lbAdd [14882, _message] call BIS_fnc_MP;
ctrlSetText [14883, "Отправлено!"];

[_messagedisplay] remoteExec ["hint", _target1];


};

when I try to send msg to other players it's randomly sends to a random guy from GETPLAYERSARRAY_FUNC  (or don't send it at all, idk why :< )

I want to make this code doing right - to send right message to the person, that I really select. 

Share this post


Link to post
Share on other sites

_target1 is not defined in MAIL_FNC_SENDLOCAL

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, gc8 said:

_target1 is not defined in MAIL_FNC_SENDLOCAL

i defined _target1 like this

MAIL_FNC_SENDLOCAL = {

_index = lbCurSel 14881;
_target1 = lbdata [14881, _index];


_message = ctrlText 14883;
_text_admin_Err = format ["<t color='#F68617'  >Ошибка блять сука не видит чела ебанного</t><br />"];	
if (_target1 == "") exitWith {hint parseText (_text_admin_Err);};
//_target1 = missionNamespace getVariable ( _target1 );
_sender = player;


_messagedisplay = parsetext format ["<t size='2' align ='center' color='#ffcc00'>Новое сообщение</t><br></br><br></br>
<t size='1' align ='left' color='#00cc00'>Кому:</t><t align ='left'> Вам</t><br></br>
<t size='1' align ='left' color='#00cc00'>От:</t> <t align ='left'> %1</t><br></br><br></br>
<t size='1' align ='left' color='#00cc00'>Сообщение:</t><br></br>
<t size='1' align ='left'>%2</t>", name player, _message];
lbAdd [14882, _message] call BIS_fnc_MP;
ctrlSetText [14883, "Отправлено!"];

[_messagedisplay] remoteExec ["hint", _target1];


};

but its still doesn't working - no message sent 😞

Share this post


Link to post
Share on other sites

You are setting the data with "name _x". valid remote target would be simply the "_x" (player obj)

 

But lbSetData only excepts strings so you need a workaround

Share this post


Link to post
Share on other sites
8 minutes ago, gc8 said:

You are setting the data with "name _x". valid remote target would be simply the "_x" (player obj)

 

But lbSetData only excepts strings so you need a workaround

can lbSetValue be useful here?

Share this post


Link to post
Share on other sites
11 minutes ago, wh1ten3ss said:

can lbSetValue be useful here?

 

no because it only takes number

 

unless you put "owner _x" there, then maybe

 

  • Like 1

Share this post


Link to post
Share on other sites

Here's couple of threads that might help

 

 

 

  • Like 1

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

×