Jump to content
  • 0
juandayz

DZMS Change color text of info spawn missions

Question

15 answers to this question

Recommended Posts

  • 0
4 minutes ago, lonewolfgaming said:

example: _hMSG = "<t align='center' color='#FACC2E' shadow='2' size='1.75'  - the letters and numbers after the # based on what color. Here is a link to HTML color code site: http://html-color-codes.info/

tnks wolf, but  i need put it in there? or where? in each mission file?

Spoiler

if(!isDedicated) then {

    fnc_remote_message = {
    
        private ["_type","_message","_player"];
    
        _type         = _this select 0;
        _message     = _this select 1;
        
        call {
            if(_type == "radio") exitWith {
                if(player hasWeapon "ItemRadio") then {
                    if(player getVariable["radiostate",true]) then {
                        systemChat _message;
                        [objNull,player,rSAY,"Radio_Message_Sound",30] call RE;
                    };
                };
            };
            if(_type == "global") exitWith { systemChat _message; };
        };
    };
    
    "RemoteMessage" addPublicVariableEventHandler { (_this select 1) call fnc_remote_message; };

};

remote_ready = true;

 

Share this post


Link to post
Share on other sites
  • 0

well cant make it works....

i replace one of mission files by:

Spoiler

private ["_missName","_coords","_vehicle","_hint"];

//Name of the Mission
_missName = "Bandit Squad";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

//[nil,nil,rTitleText,"A Bandit Squad has been spotted!\nStop them from completing their patrol!", "PLAIN",10] call RE; //ORIGINAL MISSION TEXT FORMAT
_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>mission text</t><br/><t align='center' color='#ffffff'>MISSION TEXT</t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";

//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;

and added in init.sqf

Spoiler

if (!isDedicated) then {
    //Conduct map operations

//other codes

_nil = [] execVM "custom\remote\remote.sqf";

remote.sqf

Spoiler

if(!isDedicated) then {

    fnc_remote_message = {
    
        private ["_type","_message","_player"];
    
        _type         = _this select 0;
        _message     = _this select 1;
        
        call {
            if(_type == "radio") exitWith {
                if(player hasWeapon "ItemRadio") then {
                    if(player getVariable["radiostate",true]) then {
                        systemChat _message;
                        [objNull,player,rSAY,"Radio_Message_Sound",30] call RE;
                    };
                };
            };
            if(_type == "global") exitWith { systemChat _message; };
        };
    };
    
    "RemoteMessage" addPublicVariableEventHandler { (_this select 1) call fnc_remote_message; };

};

remote_ready = true;

 

try too into remote.sqf

Spoiler
 

fnc_remote_message = {
    private ["_type", "_message", "_player"];
    _type = _this select 0;
    _message = _this select 1;
    if (count _this > 2) then {
        _player = _this select 2;
        if (_player == player) then {
            switch (_type) do {
                case "globalChat": {
                    player globalChat _message;
                };
                case "hint": {
                    hint _message;
                };
                case "titleCut": {
                    titleCut [_message, "PLAIN DOWN", 3];
                };
                case "titleText": {
                    titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
                };
            };
        };
    } else {
        switch (_type) do {
            case "hint": {
                hint _message;
            };
            case "titleCut": {
                titleCut [_message,"Plain Down",3];
            };
            case "titleText": {
                titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
            };
        };
    };
};

"customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};

but my server stop before read db.

rpt error

Spoiler

17:09:45 Warning Message: Script z\addons\dayz_server\init\server_functions.sqf not found

17:09:45 Warning Message: Script z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf not found
17:09:45 Warning Message: Script z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf not found
17:09:45 Warning Message: Script z\addons\dayz_server\system\server_monitor.sqf not found

 

Share this post


Link to post
Share on other sites
  • 0

here is the info MattewK sent me when I was trying to have the DZMS messages show with a debug monitor running:

I tried the following and it works , for me anyway :p

after the while {j0k3r5_stats} do { ... add:...  if(waitDebug) then {sleep 10; waitDebug = false;};  ...... like this.... 

  while {j0k3r5_stats} do
    {
		if(waitDebug) then {sleep 10; waitDebug = false;};

At the top of your mission files: 

//DEBUG WAIT
waitDebug = true;
publicVariable "waitDebug";

I've tried it on my test server and it works perfectly.. 

Share this post


Link to post
Share on other sites
  • 0
13 hours ago, lonewolfgaming said:

here is the info MattewK sent me when I was trying to have the DZMS messages show with a debug monitor running:

I tried the following and it works , for me anyway :p

after the while {j0k3r5_stats} do { ... add:...  if(waitDebug) then {sleep 10; waitDebug = false;};  ...... like this.... 

  while {j0k3r5_stats} do
    {
		if(waitDebug) then {sleep 10; waitDebug = false;};

At the top of your mission files: 

//DEBUG WAIT
waitDebug = true;
publicVariable "waitDebug";

I've tried it on my test server and it works perfectly.. 

mmmm i think you dont understand me :)   i wanna change text colours of missions file...  for example when mission spawn send a global text . i wanna change it.

something like this

  but dsnt work for me.

 

Share this post


Link to post
Share on other sites
  • 0
On 7/4/2016 at 4:17 PM, juandayz said:

well cant make it works....

i replace one of mission files by:

  Hide contents

private ["_missName","_coords","_vehicle","_hint"];

//Name of the Mission
_missName = "Bandit Squad";

//DZMSFindPos loops BIS_fnc_findSafePos until it gets a valid result
_coords = call DZMSFindPos;

//[nil,nil,rTitleText,"A Bandit Squad has been spotted!\nStop them from completing their patrol!", "PLAIN",10] call RE; //ORIGINAL MISSION TEXT FORMAT
_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>mission text</t><br/><t align='center' color='#ffffff'>MISSION TEXT</t>"];
customRemoteMessage = ['hint', _hint];
publicVariable "customRemoteMessage";

//DZMSAddMinMarker is a simple script that adds a marker to the location
[_coords,_missName] ExecVM DZMSAddMinMarker;

and added in init.sqf

  Reveal hidden contents

if (!isDedicated) then {
    //Conduct map operations

//other codes

_nil = [] execVM "custom\remote\remote.sqf";

remote.sqf

  Reveal hidden contents

if(!isDedicated) then {

    fnc_remote_message = {
    
        private ["_type","_message","_player"];
    
        _type         = _this select 0;
        _message     = _this select 1;
        
        call {
            if(_type == "radio") exitWith {
                if(player hasWeapon "ItemRadio") then {
                    if(player getVariable["radiostate",true]) then {
                        systemChat _message;
                        [objNull,player,rSAY,"Radio_Message_Sound",30] call RE;
                    };
                };
            };
            if(_type == "global") exitWith { systemChat _message; };
        };
    };
    
    "RemoteMessage" addPublicVariableEventHandler { (_this select 1) call fnc_remote_message; };

};

remote_ready = true;

 

try too into remote.sqf

  Reveal hidden contents
 

fnc_remote_message = {
    private ["_type", "_message", "_player"];
    _type = _this select 0;
    _message = _this select 1;
    if (count _this > 2) then {
        _player = _this select 2;
        if (_player == player) then {
            switch (_type) do {
                case "globalChat": {
                    player globalChat _message;
                };
                case "hint": {
                    hint _message;
                };
                case "titleCut": {
                    titleCut [_message, "PLAIN DOWN", 3];
                };
                case "titleText": {
                    titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
                };
            };
        };
    } else {
        switch (_type) do {
            case "hint": {
                hint _message;
            };
            case "titleCut": {
                titleCut [_message,"Plain Down",3];
            };
            case "titleText": {
                titleText [_message, "PLAIN DOWN"]; titleFadeOut 10;
            };
        };
    };
};

"customRemoteMessage" addPublicVariableEventHandler {(_this select 1) call fnc_remote_message;};

but my server stop before read db.

rpt error

  Reveal hidden contents

17:09:45 Warning Message: Script z\addons\dayz_server\init\server_functions.sqf not found

17:09:45 Warning Message: Script z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\dynamic_vehicle.sqf not found
17:09:45 Warning Message: Script z\addons\dayz_server\missions\DayZ_Epoch_11.Chernarus\mission.sqf not found
17:09:45 Warning Message: Script z\addons\dayz_server\system\server_monitor.sqf not found

 

Juan try it like this:

_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>mission text</t><br/><t align='center' color='#ffffff'>MISSION TEXT</t>"];
RemoteMessage = ['hint', _hint];
publicVariable "RemoteMessage";

 

as RemoteMessage  not customRemoteMessage.  

Thats how mine works, i use radio messages  but my calls are using the same remote message script

Share this post


Link to post
Share on other sites
  • 0
1 hour ago, SideShowFreak said:

Juan try it like this:

_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>mission text</t><br/><t align='center' color='#ffffff'>MISSION TEXT</t>"];
RemoteMessage = ['hint', _hint];
publicVariable "RemoteMessage";

 

as RemoteMessage  not customRemoteMessage.  

Thats how mine works, i use radio messages  but my calls are using the same remote message script

many tnks! gonna try!

Share this post


Link to post
Share on other sites
  • 0
On 6/7/2016 at 1:12 PM, SideShowFreak said:

Juan try it like this:

_hint = parseText format["<t align='center' color='#FFFF66' shadow='2' size='1.75'>mission text</t><br/><t align='center' color='#ffffff'>MISSION TEXT</t>"];
RemoteMessage = ['hint', _hint];
publicVariable "RemoteMessage";

 

as RemoteMessage  not customRemoteMessage.  

Thats how mine works, i use radio messages  but my calls are using the same remote message script

well not work for me......... i fail in somewhere.....          can u paste one of ure missions file and u remote.sqf  and how u call it? i know is a lot but im getting crazy :D if ucant thers no problem

Share this post


Link to post
Share on other sites
  • 0

I actually prefer having the mission text appear at the top of the screen using infistar's messaging.

 

Example:

 

_txt = "A C130 Carrying Supplies has Crashed! Bandits are Securing the Cargo!";
fnc_show_colorAdminMsg = [_txt,'#F00000'];
publicVariable 'fnc_show_colorAdminMsg';

 

_txt = "The C130 Crash Site has been Secured!";
fnc_show_colorAdminMsg = [_txt,'#F00000'];
publicVariable 'fnc_show_colorAdminMsg';

 

I also added _text to the private array at the top of each mission

This will show the text at the top of the screen in the color Red.

I have it set up to spawn Hero and Bandit missions so feel free to change the Red (what I use for the Bandit Text) to whatever color you want.

 

You can do that for each mission and it's completion text.

Share this post


Link to post
Share on other sites
  • 0

Sure Juan  here is my remote.sqf

Spoiler

fnc_remote_message = {

    private["_type","_message"];

    _type         = _this select 0;
    _message     = _this select 1;

    call {
        if(_type == "radio")        exitWith { 
            if(player hasWeapon "ItemRadio") then { 
                if(player getVariable["radiostate",true]) then {
                    systemChat _message;
                    [objNull,player,rSAY,"Radio_Message_Sound",30] call RE;
                };
            }; 
        };
        if(_type == "private")        exitWith { if(getPlayerUID player == (_message select 0)) then { systemChat (_message select 1); }; };
        if(_type == "global")        exitWith { systemChat _message; };
        if(_type == "dynamic_text")    exitWith { 
            [
                format["<t size='0.40' color='#FFFFFF' align='center'>%1</t><br /><t size='0.70' color='#d5a040' align='center'>%2</t>",(_message select 0),(_message select 1)],
                0,
                0,
                10,
                0.5
            ] spawn BIS_fnc_dynamicText; 
        };
    };
};

/* WIP

fnc_remote_marker = {

    private["_req","_location","_shape","_color","_size","_alpha","_timeout","_marker","_name"];

    _req = _this select 0;

    if(player hasWeapon "_req") then {

        _location     = _this select 1;
        _shape         = _this select 2;
        _color         = _this select 3;
        _size        = _this select 4;
        _alpha         = _this select 5;
        _timeout     = _this select 6;
        _name         = _this select 7;

        _marker = createMarkerLocal[_name,_location];
        _marker setMarkerShapeLocal _shape;
        _marker setMarkerColorLocal _color;
        _marker setMarkerAlphaLocal _alpha;
        _marker setMarkerSizeLocal[(_size),(_size)];

        [_timeout,_marker] spawn {
            sleep (_this select 0);
            deleteMarkerLocal (_this select 1);
        };

    };

};

*/

"RemoteMessage" addPublicVariableEventHandler { (_this select 1) spawn fnc_remote_message; };
//"RemoteMarker" addPublicVariableEventHandler { (_this select 1) spawn fnc_custom_marker; };

 and here is a snippet from a DZMS mission 

RemoteMessage = ["radio","[RADIO] Bandits have Overrun a NATO Weapons Cache!"];
publicVariable "RemoteMessage";

 

But looking at remote.sqf im not seeing any   

 if(_type == "hint") =

which might be an issue, im pretty sure "hint" would need to be defined in remote.sqf

 

maybe the  "dynamic text" is the one you are looking for?  i dont think so though

Share this post


Link to post
Share on other sites
  • 0
On 7/8/2016 at 6:13 AM, BigEgg said:

I actually prefer having the mission text appear at the top of the screen using infistar's messaging.

 

Example:

 

_txt = "A C130 Carrying Supplies has Crashed! Bandits are Securing the Cargo!";
fnc_show_colorAdminMsg = [_txt,'#F00000'];
publicVariable 'fnc_show_colorAdminMsg';

 

_txt = "The C130 Crash Site has been Secured!";
fnc_show_colorAdminMsg = [_txt,'#F00000'];
publicVariable 'fnc_show_colorAdminMsg';

 

I also added _text to the private array at the top of each mission

This will show the text at the top of the screen in the color Red.

I have it set up to spawn Hero and Bandit missions so feel free to change the Red (what I use for the Bandit Text) to whatever color you want.

 

You can do that for each mission and it's completion text.

Sorry for bumpin an old thread.. But was the only post i could about the subject.

Trying to use theese messages for the carepackage script. Instead of that silly white text i would like to use the infistar text.

But cant seem to make it run. Is it because of the eventhandler is only serverside? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • By Bloodthirsty
      Hey I just need some files for this server, any and all you guys can come up with and think it deserve post that shit in chat rn. I want to see some crazy ideas and additions if you got em :) Lets see what you guys can come up with

    • By juandayz
      I JUST LEAVE THIS ONE CUZ I KNOW YOU GUYS GONNA NEED IT..
       
      The very old safezone script by infistar... i was using it in 1.0.5.1  and made some changes to use in 1.6.
      Instructions:
          1. Copy paste the code of below into a file called 16_safezone.sqf - save the file.
          2. Paste this 16_safezone.sqf into mpmissioms\instance_11.chernarus\custom\
          3. Open your init.sqf
          4. At the very bottom of the file add this line:  [] execVM "custom\16_safezone.sqf";
          5. Save the init.sqf and restart your server.
          6-WARNING!!! if ure using some kind of mod that allow vehicles with GodMode out of safezones..  then you will need in 16_safezone.sqf change the path for veh_handleDam.sqf by the path that youre using your custom veh_handleDam.sqf
      this line:  fnc_veh_handleDam = compile preprocessFileLineNumbers '\z\addons\dayz_code\compile\veh_handleDam.sqf';
          16_safezone.sqf
       
      OPTIONAL:
      @BetterDeadThanZed here you got.
      REMOVE LOOT FROM TRADER CITIES AND PLOT POLES. (should removes zeds from trader places and poles too)
       
       
  • Advertisement
  • Advertisement
  • Supporters
  • Advertisement
  • Discord

×