Hallo,
ich habe mich an einem Grundlegenden Notruf System Versucht. Der call vom Dialog zur fn_newsMSG.sqf wird ausgeführt und auch das case ist richtig angewählt. Jedoch von da zur fn_handleMessages.sqf funktioniert nichts mehr. Habe es in der Remoteexe unter Server, Client und anyone versucht aber es funktioniert nicht. Auch ein test auf dem Server mit der Debug Console die Datei aufzurufen funktioniert nicht. Also was mache ich flache ? Ich verzweifele daran. Ich hänge die Server RPT mit an. Wenn weiteres Benötig wird fragt mich ruhig und steinigt mich nicht
C: Chat_Dialog.hpp
class life_chat_dialog {
idd = 3333;
name= "life_chat_dialog";
movingEnable = 0;
enableSimulation = 1;
class controlsBackground {
class Tablet_Background: Life_RscStaticPicture {
idc = -1;
text = "\tbg_hud\Flyyying_Textures\Tablet\flyyying_tablet.paa";
x = 0.149375 * safezoneW + safezoneX;
y = -0.1094 * safezoneH + safezoneY;
w = 0.696094 * safezoneW;
h = 1.221 * safezoneH;
};
class Sides_Background: Life_RscStaticTitle {
idc = -1;
text = "";
x = 0.355625 * safezoneW + safezoneX;
y = 0.665 * safezoneH + safezoneY;
w = 0.283594 * safezoneW;
h = 0.077 * safezoneH;
colorBackground[] = {0.3,0.3,0.3,0.8};
};
class Anonym_Text: Life_RscStaticTitle {
idc = -1;
text = "Anonym";
x = 0.576314 * safezoneW + safezoneX;
y = 0.5726 * safezoneH + safezoneY;
w = 0.0608439 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.3,0.3,0.3,0.8};
};
class Position_Text: Life_RscStaticTitle {
idc = -1;
text = "Pos. Send.";
x = 0.576383 * safezoneW + safezoneX;
y = 0.630556 * safezoneH + safezoneY;
w = 0.0608439 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {0.3,0.3,0.3,0.8};
};
class Chat_Background: Life_RscStaticTitle {
idc = -1;
text = "";
x = 0.355625 * safezoneW + safezoneX;
y = 0.258 * safezoneH + safezoneY;
w = 0.283594 * safezoneW;
h = 0.275 * safezoneH;
colorBackground[] = {0.3,0.3,0.3,0.8};
};
};
class controls {
class Civ_Button : Life_RscButtonPictureInvisible {
idc = 99991;
text = "\tbg_hud\Flyyying_Textures\Tablet\flyyying_write.paa";
x = 0.37625 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.055 * safezoneH;
onButtonClick = "";
};
class Cop_Button : Life_RscButtonPictureInvisible {
idc = 99992;
text = "\tbg_hud\Flyyying_Textures\Tablet\flyyying_police.paa";
x = 0.429874 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.055 * safezoneH;
onButtonClick = "[0] call flyyying_fnc_newMsg;";
tooltip = "TPD Notruf Senden";
};
class Med_Button : Life_RscButtonPictureInvisible {
idc = 99993;
text = "\tbg_hud\Flyyying_Textures\Tablet\flyyying_app_notruf.paa";
x = 0.481438 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.055 * safezoneH;
onButtonClick = "[] call FLUG_fnc_cell_TFDrequest";
tooltip = "TFD Notruf Senden";
};
class TextField : Life_RscEdit {
idc = 33335;
text = "Text eingeben...";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.357688 * safezoneW + safezoneX;
y = 0.5462 * safezoneH + safezoneY;
w = 0.180478 * safezoneW;
h = 0.1078 * safezoneH;
style = 16;
lineSpacing = 1;
shadow = 2;
};
class Anonym_Checkbox: Life_RscCheckbox {
idc = 33339;
x = 0.595907 * safezoneW + safezoneX;
y = 0.5374 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.033 * safezoneH;
onCheckedChanged = "";
tooltip = "Ankreuzen um deine Nachricht anonym zu senden.";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.6)";
};
class Pos_Checkbox: Life_RscCheckbox {
idc = 333310;
x = 0.595907 * safezoneW + safezoneX;
y = 0.595356 * safezoneH + safezoneY;
w = 0.020625 * safezoneW;
h = 0.033 * safezoneH;
onCheckedChanged = "";
tooltip = "Ankreuzen um deine Nachricht mit deiner Position zu senden.";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.6)";
};
class Back_Button: Life_RscButtonInvisible {
idc = -1;
x = 0.4835 * safezoneW + safezoneX;
y = 0.764 * safezoneH + safezoneY;
w = 0.0309375 * safezoneW;
h = 0.055 * safezoneH;
onButtonClick = "closeDialog 0;";
tooltip = "Zurück";
};
};
};
Alles anzeigen
C: fn_newMsg.sqf
_type = [_this,0,-1] call BIS_fnc_param;
switch(_type) do
{
//To All TPD
case 0: {
private ["_msg","_to"];
ctrlShow[99993,false];
_msg = ctrlText 33335;
_length = count (toArray(_msg));
if (_length > 400) exitWith {hint "Deine Nachricht darf maximal 400 Zeichen enthalten!!";ctrlShow[99993,true];};
_to = "TPD";
if (_msg isEqualTo "") exitWith {hint "Du musst eine Nachricht eingeben!";ctrlShow[99993,true];};
[_msg,name player,0] remoteExecCall ["FLUG_fnc_handleMessages",2];
hint format ["Du hast eine Nachricht an das TPD gesendet. %2",_to,_msg];
ctrlShow[99993,true];
};
//To All TFD
case 1: {
private ["_msg","_to"];
ctrlShow[99993,false];
_msg = ctrlText 33335;
_length = count (toArray(_msg));
if (_length > 400) exitWith {hint "Deine Nachricht darf maximal 400 Zeichen enthalten!!";ctrlShow[99993,true];};
_to = "TFD";
if (_msg isEqualTo "") exitWith {hint "Du musst eine Nachricht eingeben!";ctrlShow[99993,true];};
[_msg,name player,1] remoteExecCall ["FLUG_fnc_handleMessages",2];
hint format ["Du hast eine Nachricht an das TFD gesendet. %2",_to,_msg];
ctrlShow[99993,true];
};
};
Alles anzeigen
C: fn_handleMessages.sqf
if (isServer) exitWith {};
private ["_msg","_from", "_type", "_unit"];
_msg = _this select 0;
_from = _this select 1;
_type = _this select 2;
_unit = _this select 3;
if (_from isEqualTo "") exitWith {};
switch (_type) do {
case 0 : {
if (side player == west) exitWith {
hint parseText format ["<t color='#FF0000'><t size='2'><t align='center'>TPD Request<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>You<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%2",_from,_msg];
systemChat "TPD Notruf: %1",_msg;
};
};
case 0 : {
if (side player == independent) exitWith {
hint parseText format ["<t color='#FF0000'><t size='2'><t align='center'>TFD Request<br/><br/><t color='#33CC33'><t align='left'><t size='1'>To: <t color='#ffffff'>You<br/><t color='#33CC33'>From: <t color='#ffffff'>%1<br/><br/><t color='#33CC33'>Message:<br/><t color='#ffffff'>%2",_from,_msg];
systemChat "TFD Notruf: %1",_msg;
};
};
};
Alles anzeigen
MFG