Hey Leute,
da mir mal wieder langweilig war, habe ich ein neues script für euch, welches dem ein oder anderen vielleicht hilfreich sein könnte. Den wie oben schon genannt, geht es darum über eine Checkbox den Sendernamen oder die Koordinaten mitzusenden oder unkenntlich zu machen.
Life Server:
#1 \life_server\functions.sqf
- Geht in die oben genannte Datei und scrollt zu den Msg Funktionen runter (beginnen ca. bei Z.128)
- Fügt in den Funktionen (TON_fnc_cell_emsrequest, TON_fnc_cell_textmsg, TON_fnc_cell_textcop sowie weitere Funktionen die ihr selber eingebaut habt) folgendes nach dieser IF-Abfrage
ein:
_kord = """";
_name = """";
_vKord = cbChecked ((findDisplay 3000) displayCtrl 3023);
if (_vKord) then {_kord=""Unbekannt"";}else{_kord=mapGridPosition player;};
_vName = cbChecked ((findDisplay 3000) displayCtrl 3024);
if (_vName) then {_name=""Unbekannt""}else{_name=name player;};
- Ändert eine Zeile darunter (in der remoteExecCall Funktion) in:
- Wiederholt diesen Schritt bei den anderen Funktionen
- Das war es mit dem bearbeiten am life server
Missionsdatei:
Die folgenden Schritte sind sozusagen freiwillig, da wir nurnoch einen Dialog brauchen der die 2 Checkboxen beinhaltet, diesen könnt ihr natürlich selber machen, ich stelle euch jedoch einen selbsterstellten zur Verfügung.
#2 dialog\cell_phone.hpp
- Ersetzt ganz einfach die ganze Datei mit der im Spoiler:
Spoiler anzeigen
´
class Life_cell_phone {
idd = 3000;
name= "life_cell_phone";
movingEnable = 0;
enableSimulation = 1;
onLoad = "[] spawn life_fnc_cellphone";
class controlsBackground {
class Life_RscTitleBackground: Life_RscText
{
idc = -1;
text = "SMS schreiben..."; //--- ToDo: Localize;
x = 0.530937 * safezoneW + safezoneX;
y = 0.335 * safezoneH + safezoneY;
w = 0.175313 * safezoneW;
h = 0.022 * safezoneH;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
};
class MainBackground: Life_RscText
{
idc = -1;
x = 0.530937 * safezoneW + safezoneX;
y = 0.357 * safezoneH + safezoneY;
w = 0.175313 * safezoneW;
h = 0.396 * safezoneH;
colorBackground[] = {0,0,0,0.7};
};
class TextToSend: Life_RscTitle
{
idc = -1;
text = "Senden an:"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.544 * safezoneH + safezoneY;
w = 0.154687 * safezoneW;
h = 0.0374 * safezoneH;
colorText[] = {0.95,0.95,0.95,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class Title3 : Life_RscText
{
idc = -1;
text = "Koords. verschlüsseln:"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.6144 * safezoneH + safezoneY;
w = 0.154687 * safezoneW;
h = 0.022 * safezoneH;
};
class Title4 : Life_RscText
{
idc = -1;
text = "Sender verschlüsseln:"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.6386 * safezoneH + safezoneY;
w = 0.154687 * safezoneW;
h = 0.022 * safezoneH;
};
};
class controls {
class textEdit: Life_RscEdit
{
idc = 3003;
text = "";
x = 0.54125 * safezoneW + safezoneX;
y = 0.379 * safezoneH + safezoneY;
w = 0.154687 * safezoneW;
h = 0.154 * safezoneH;
};
class TextMsgButton: Life_RscButtonMenu
{
idc = 3015;
onButtonClick = "[] call TON_fnc_cell_textmsg";
text = "Senden"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.588 * safezoneH + safezoneY;
w = 0.154687 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class PlayerList: Life_RscCombo
{
idc = 3004;
x = 0.592812 * safezoneW + safezoneX;
y = 0.5506 * safezoneH + safezoneY;
w = 0.0979687 * safezoneW;
h = 0.022 * safezoneH;
};
class TextCopButton: Life_RscButtonMenu
{
idc = 3016;
onButtonClick = "[] call TON_fnc_cell_textcop";
text = "Nato Notruf"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0721875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class TextAdminButton: Life_RscButtonMenu
{
idc = 3017;
onButtonClick = "[] call TON_fnc_cell_textadmin";
text = "Reg. Anfrage"; //--- ToDo: Localize;
x = 0.54125 * safezoneW + safezoneX;
y = 0.709 * safezoneH + safezoneY;
w = 0.0721875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class AdminMsgButton: Life_RscButtonMenu
{
idc = 3020;
onButtonClick = "[] call TON_fnc_cell_adminmsg";
text = "Als Reg."; //--- ToDo: Localize;
x = 0.70625 * safezoneW + safezoneX;
y = 0.588 * safezoneH + safezoneY;
w = 0.061875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class AdminMsgAllButton: Life_RscButtonMenu
{
idc = 3021;
onButtonClick = "[] call TON_fnc_cell_adminmsgall";
text = "Reg. Rundmsg"; //--- ToDo: Localize;
x = 0.70625 * safezoneW + safezoneX;
y = 0.621 * safezoneH + safezoneY;
w = 0.061875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class EMSRequest: Life_RscButtonMenu
{
idc = 3022;
onButtonClick = "[] call TON_fnc_cell_emsrequest";
text = "EMS Notruf"; //--- ToDo: Localize;
x = 0.62375 * safezoneW + safezoneX;
y = 0.676 * safezoneH + safezoneY;
w = 0.0721875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class CloseButtonKey: Life_RscButtonMenu
{
onButtonClick = "closeDialog 0;";
idc = -1;
text = "Schließen"; //--- ToDo: Localize;
x = 0.530937 * safezoneW + safezoneX;
y = 0.753 * safezoneH + safezoneY;
w = 0.0644531 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {0,0,0,0.8};
};
class BtnCopAllMsg : Life_RscButtonMenu
{
idc = 3025;
onButtonClick = "";
text = "NOT LOADED"; //--- ToDo: Localize;
x = 0.62375 * safezoneW + safezoneX;
y = 0.709 * safezoneH + safezoneY;
w = 0.0721875 * safezoneW;
h = 0.022 * safezoneH;
colorText[] = {1,1,1,1};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",0.5};
};
class CBKoords: Life_Checkbox
{
idc = 3023;
x = 0.62375 * safezoneW + safezoneX;
y = 0.6144 * safezoneH + safezoneY;
w = 0.0154688 * safezoneW;
h = 0.022 * safezoneH;
};
class CBName: Life_Checkbox
{
idc = 3024;
x = 0.62375 * safezoneW + safezoneX;
y = 0.6386 * safezoneH + safezoneY;
w = 0.0154688 * safezoneW;
h = 0.022 * safezoneH;
};
};
};
Das wars, ich hoffe bei euch Funktioniert das Script genauso wie bei mir markelos und wünsche euch Viel Spaß damit.