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!"

Link to post
Share on other sites
  • Replies 186
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

By: CubeX Designs *FOR VERSION 5.0* Difficulty: Medium 1. Preview 2. Installation 3. FAQ   1| Preview:     2| Installation:   1: Go to you

Good way to start dialog if you don't have the time or patience is to use https://github.com/kayler-renslow/arma-dialog-creator, any gui I have done on this website was using this and photoshop

https://pastebin.com/tmN1Vzfg  I dont understand why I dont get more in the log?   EDIT: I fixed the problem, it was something wrong with my "fn_requestReceived.sqf" which weird enough

Posted Images

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
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.

Link to post
Share on other sites
  • 4 weeks later...
  • 2 weeks later...
  • 1 month later...
On 6/19/2020 at 9:35 PM, Enrah said:

@CubeX Would you be able to help show me how to implement this market menu into the CBX phone with the button :) https://www.altisliferpg.com/topic/2211-releasetutorial-y-menu-market-display-with-item-descriptions-50-44r3/

@Ilusionz would you be able to lend a hand or someone? i have managed to add a new market button to the phone however when calling the market script - onButtonClick = "[] call CBX_fnc_marketMenu;";

It does not work?

I have also tried - onButtonClick = "[] call life_fnc_marketMenu;";

and it is still the same outcome?

Link to post
Share on other sites
  • 5 months later...

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.