Jump to content

Recommended Posts

On 1/7/2020 at 4:28 AM, GraveYard said:

Inside functions.sqf replace //To One Person

  Reveal hidden contents

//To One Person
TON_fnc_cell_textmsg =
compileFinal "
   private [""_msg"",""_to""];
   ctrlShow[2401,false];
   _msg = ctrlText 2400;

   _length = count (toArray(_msg));
   if (_length > 400) exitWith {hint localize ""STR_CELLMSG_LIMITEXCEEDED"";ctrlShow[2401,true];};
   if (lbCurSel 3004 isEqualTo -1) exitWith {hint localize ""STR_CELLMSG_SelectPerson""; ctrlShow[2401,true];};

   _to = call compile format [""%1"",(lbData[3004,(lbCurSel 3004)])];
   if (isNull _to) exitWith {ctrlShow[2401,true];};
   if (isNil ""_to"") exitWith {ctrlShow[2401,true];};
   if (_msg isEqualTo """") exitWith {hint localize ""STR_CELLMSG_EnterMSG"";ctrlShow[2401,true];};

   [_msg,name player,0] remoteExecCall [""TON_fnc_clientMessage"",_to];
   [] call life_fnc_cellphone;
   hint format [localize ""STR_CELLMSG_ToPerson"",name _to,_msg];
   ctrlShow[2401,true];
";

 

 

Replace fn_cellphone.sqf

  Reveal hidden contents

#include "..\..\script_macros.hpp"
/*
    File: fn_cellphone.sqf
    Author: Alan

    Description:
    Opens the cellphone menu?
*/
private ["_display","_units","_type"];

disableSerialization;
waitUntil {!isNull findDisplay 2502};
_display = findDisplay 2502;
_units = _display displayCtrl 3004;

ctrlSetText [2400, ""];
lbClear _units;

if (FETCH_CONST(life_adminlevel) < 1) then {
    ctrlShow[2406,false];
    ctrlShow[2407,false];
};
{
    if (alive _x && !(_x isEqualTo player)) then {
        _type = switch (side _x) do {
            case west: {"Cop"};
            case civilian: {"Civ"};
            case independent: {"Med"};
        };
        _units lbAdd format ["%1 (%2)",_x getVariable ["realname",name _x],_type];
        _units lbSetData [(lbSize _units)-1,str(_x)];
    };
} forEach playableUnits;

lbSetCurSel [3004,0];

 

Then replace phone.hpp

phone.hpp 3.27 kB · 15 downloads

I did all the instructions step by step. Now the player names show up but even if I choose the player, it still says "You must select a player you are sending the text to!"

Share this post


Link to post
Share on other sites

Inside CBX\phone\dialogs\phone.hpp

Inside find 

class playerscombo: Life_RscCombo
		{
			idc = 2100;
			x = 0.496906 * safezoneW + safezoneX;
			y = 0.291 * safezoneH + safezoneY;
			w = 0.0680624 * safezoneW;
			h = 0.022 * safezoneH;
		};

And change to 

class playerscombo: Life_RscCombo
		{
			idc = 3004;
			x = 0.496906 * safezoneW + safezoneX;
			y = 0.291 * safezoneH + safezoneY;
			w = 0.0680624 * safezoneW;
			h = 0.022 * safezoneH;
		};

@VatanTC

Edited by GraveYard

Share this post


Link to post
Share on other sites
3 hours ago, GraveYard said:

Inside CBX\phone\dialogs\phone.hpp

Inside find 

class playerscombo: Life_RscCombo
		{
			idc = 2100;
			x = 0.496906 * safezoneW + safezoneX;
			y = 0.291 * safezoneH + safezoneY;
			w = 0.0680624 * safezoneW;
			h = 0.022 * safezoneH;
		};

And change to 

class playerscombo: Life_RscCombo
		{
			idc = 3004;
			x = 0.496906 * safezoneW + safezoneX;
			y = 0.291 * safezoneH + safezoneY;
			w = 0.0680624 * safezoneW;
			h = 0.022 * safezoneH;
		};

@VatanTC

It is already like that. It is already 3004.

Share this post


Link to post
Share on other sites
21 minutes ago, GraveYard said:

I'll throw it up on a test server in a few and see whats up.

 

Okay thank you, I will wait.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.