hab es soweit hinbekommen das die message gesndet wird aber bei dem adac kommt keine message an pls help
gleiches problem... wäre ganz toll wenn wer helfen kann. Finde einfach keine Lösung
Schön, dass du den Weg zu NodeZone.net gefunden hast! Aktuell bist du nicht angemeldet und kannst deshalb nur eingeschränkt auf unsere Community zugreifen. Um alle Funktionen freizuschalten, spannende Inhalte zu entdecken und dich aktiv einzubringen, registriere dich jetzt kostenlos oder melde dich mit deinem Account an.
hab es soweit hinbekommen das die message gesndet wird aber bei dem adac kommt keine message an pls help
gleiches problem... wäre ganz toll wenn wer helfen kann. Finde einfach keine Lösung
gleiches problem... wäre ganz toll wenn wer helfen kann. Finde einfach keine Lösung
versuch es mit dem medic nachichten abzugleichen... aber bin mit den ADAC messages leider auch noch nicht weiter gekommen
Haben wir auch probiert, hab das vom EMS (medic) Kopiert, eingefügt, angepasst, leider weiterhin ohne erfolg. bin jede datei durch gegangen find nirgents den Fehler -.-
Ich habe das Problem, dass wenn ich die Nachricht sende oben eine Meldung kommt jedoch die Nachricht zu der Person geschickt wird!
Hey,
hab leider das Problem das die Nachrichten nicht bei dem ausgewählten Spieler ankommen.
Overlay und anderes diverses ist da.
Bitte um Hilfe
ich habe hier noch den Löschen Button(Alle Nachrichten)
In der "CfgRemoteExec.hpp", fügt das hier ein:
F(TON_fnc_cleanupMessages,SERVER)
In der "dialog\smartphone.hpp", sucht nach "class Notruf" und fügt danach das hier ein:
class DeleteMessages : Life_RscButtonMenu {
idc = -1;
text = "Nachrichten leerern";
onButtonClick = "[3] call life_fnc_smartphone;";
colorBackground[] = { 0.584, 0.086, 0.086, 1.0 };
x = 0 + 0.7 - (6.25 / 40);
y = 0.25 + (1 / 25) + 0.51;
w = (6.25 / 20);
h = (1 / 25);
};
es sollte nun so aussehn:
class Notruf : Life_RscButtonMenu {
idc = -1;
text = "$STR_SMARTPHONE_NOTRUF";
onButtonClick = "createDialog ""Life_smartphone_notruf"";";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
x = 0.325 + 0.7 - (6.25 / 40);
y = 0.25 + (1 / 25) + 0.51;
w = (6.25 / 40);
h = (1 / 25);
};
class DeleteMessages : Life_RscButtonMenu {
idc = -1;
text = "Nachrichten leerern";
onButtonClick = "[3] call life_fnc_smartphone;";
colorBackground[] = { 0.584, 0.086, 0.086, 1.0 };
x = 0 + 0.7 - (6.25 / 40);
y = 0.25 + (1 / 25) + 0.51;
w = (6.25 / 20);
h = (1 / 25);
};
};
};
Alles anzeigen
jetzt öffnen wir "core\pmenu\fn_smartphone.sqf" und fügen zw. "case 2" und "case 4" den fehlenden "case 3" ein.
das sieht dann so aus:
case 1: { _msg = [_data select 2,40] call KRON_StrLeft;
_rowData = [_data select 0, _data select 1, _data select 2, _data select 3];
_cMessageList lnbAddRow[_data select 3,format["%1 ...",_msg]];
_cMessageList lnbSetData[[((lnbSize _cMessageList) select 0)-1,0],str(_rowData)];
};
case 2: { ctrlEnable[887892,true];
_target = lbData[88881,(lbCurSel 88881)];
life_smartphoneTarget = call compile format["%1",_target];
};
case 3:
{
lbClear _cMessageList;
[player] remoteExec ["TON_fnc_cleanupMessages",2];
};
case 4: {
createDialog "Life_smartphone_schreiben";
ctrlSetText[88886, format["Message: %1",name life_smartphoneTarget]];
if((FETCH_CONST(life_adminlevel) < 1)) then {
ctrlShow[888897,false];
};
};
};
Alles anzeigen
nun gehen wir in die "config.cpp" des life_server und erweiter die "class Smartphone":
class PlayTime {
file = "\life_server\Functions\PlayTime";
class setPlayTime {};
class getPlayTime {};
};
class Smartphone
{
file = "\life_server\Functions\Smartphone";
class handleMessages {};
class msgRequest {};
class cleanupMessages {};
};
};
};
Alles anzeigen
nun erstellen wir noch in "life_server\Functions\Smartphone" eine "fn_cleanupMessages.sqf" mit folgendem inhalt:
private["_player","_query"];
_player = [_this,0,ObjNull,[objNull]] call BIS_fnc_param;
if(isNull _player) exitWith {};
_query = format["DELETE FROM messages WHERE toID='%1'",getPlayerUID _player];
waitUntil{!DB_Async_Active};
[_query,1] call DB_fnc_asyncCall;
Alles anzeigen
und fertig.
Dank Exodoos hab ich das SQL-Smartphone zum laufen bekommen. Nur dadurch war es mir möglich den Button, aus einer alten Version, zu aktualisieren.
@Exodoos du kannst das gern mit bei dir einbauen/erweitern
und wer es gern wissen möchte, das komplette script läuft auch mit der aktuellen dev Revision 5.0
Moin,
kurze Frage hat sich schon einer Gedanken gemacht einen Antwortbutton mit einzubauen? Unsere Com wünscht sich den nämlich noch ;-).
Gruß,
moeck
Moin,
kurze Frage hat sich schon einer Gedanken gemacht einen Antwortbutton mit einzubauen? Unsere Com wünscht sich den nämlich noch ;-).
Gruß,
moeck
einfach die nachricht markieren und auf senden klicken
falls es doch nicht klappt kann ich mich die tage mal ran setzen wenn ich mit der jetzigen erweiterung fertig bin. (nen löschen button für einzelne nachrichten)
Muss ich mal probieren mal sehen ob es klappt. Wenn nicht baue ich die Funktion die nächsten Tage ein mit einem Extrabutton ;-). Achso ich nutze das Smartphone in der 3.1.4.8 und wir speichern auch die Notrufe im Telefon mit ab, damit die Cops und Medics nochmal nachschauen können wer sie angefordert und vonwelchem Standort. Ja die Koords sind in den Notrufen auch mit enthalten.
Achja ich habe noch eine Kleinigkeit hinzugefügt wegen der Sortierung. Es gab da nämlich Beschwerden, dass man die Leute nicht findet.
einfach hinter die foreach playableUnits. Das sieht dann so aus.
#include "..\..\script_macros.hpp"
/* file: fn_smartphone.sqf Author: Silex */
private["_display","_units","_type","_data","_rowData","_msg"];
_type = [_this,0,0] call BIS_fnc_param;
_data = [_this,1,0,["",[],0]] call BIS_fnc_param;
disableSerialization;
waitUntil {!isNull findDisplay 88888};
_display = findDisplay 88888;
_cPlayerList = _display displayCtrl 88881;
_cMessageList = _display displayCtrl 88882;
_cMessageHeader = _display displayCtrl 88886;
_cMessageHeader ctrlSetText format["Message's From:Players:"];
ctrlEnable[887892,false];
switch(_type) do{
case 0: { lbClear _cPlayerList;
{if(alive _x && _x != player) then {
switch(side _x) do
{
case west: {_type = "Cop"};
case civilian: {_type = "Civ"};
case independent: {_type = "Med"};
};
_cPlayerList lbAdd format["%1 (%2)",_x getVariable["realname", name _x],_type];
_cPlayerList lbSetData [(lbSize _cPlayerList)-1,str(_x)];
};
} forEach playableUnits;
lbSort _cPlayerList;
[getPlayerUID player, player] remoteExec ["TON_fnc_msgRequest",2];
ctrlEnable[887892,false];
};
case 1: { _msg = [_data select 2,40] call KRON_StrLeft;
_rowData = [_data select 0, _data select 1, _data select 2, _data select 3];
_cMessageList lnbAddRow[_data select 3,format["%1 ...",_msg]];
_cMessageList lnbSetData[[((lnbSize _cMessageList) select 0)-1,0],str(_rowData)];
};
case 2: { ctrlEnable[887892,true];
_target = lbData[88881,(lbCurSel 88881)];
life_smartphoneTarget = call compile format["%1",_target];
};
case 4: {
createDialog "Life_smartphone_schreiben";
ctrlSetText[88886, format["Message: %1",name life_smartphoneTarget]];
if((FETCH_CONST(life_adminlevel) < 1)) then {
ctrlShow[888897,false];
};
};
};
Alles anzeigen
Achso ich nutze das Smartphone in der 3.1.4.8
und da funzt das script aus dem ersten post?
in der Theorie sollte es so gehn weil in der fn_showMsg.sqf zeile 20 und 21 zeigen an das der button aktiviert wird mit dem user, von dem die nachricht ist, als target.
ok ich hab vor ein paar min den button zum löschen einzelner nachrichten fertig bekomm bräuchte jetzt noch nen aktiven tester dafür
@moeck vllt hast du ja lusst
@Siama theoretisch sehr gern allerdings bin ich momentan im Büro und auf dem Arbeitslaptop ist kein Arma drauf. Ich bin mir nicht sicher ob es dieses Smartphone ist oder ob das wo anders herstammt. Auf jeden Fall stammt es von Silex. Kann sein das die erste Fassung für die 3.1.4.8 war. Habe es wie gesagt dahingehend modifiziert, dass auch die Notrufe mit Koords gespeichert werden und natürlich dann für alle Cops bzw. Medics sichtbar sind.
@Siama theoretisch sehr gern allerdings bin ich momentan im Büro und auf dem Arbeitslaptop ist kein Arma drauf. Ich bin mir nicht sicher ob es dieses Smartphone ist oder ob das wo anders herstammt. Auf jeden Fall stammt es von Silex. Kann sein das die erste Fassung für die 3.1.4.8 war. Habe es wie gesagt dahingehend modifiziert, dass auch die Notrufe mit Koords gespeichert werden und natürlich dann für alle Cops bzw. Medics sichtbar sind.
ok naja der einbau des buttons sollte kein problem darstellen, sag bescheit wenn de mit arbeit fertig bist dann leite ich an. danach testest es mal mit jemanden aus deiner com. würds selbst machen aber hab derzeit keine com
heute wird das wahrscheinlich nichts mehr. Bin heute abend noch unterwegs. Ausserdem habe ich noch da noch ein anderes Thema ;-). Ich baue gerade eine Verwahrstelle für die Cops. Also eigentlich erweitere ich gerade die Garage der Spieler und füge bei den Cops eine Funktion zum beschlagnahmen ein. Mit der wird es möglich die Fahrzeuge so einzuparken, dass der Besitzer beim ausparken die angefallenen Strafen mit zahlt. Das mit dem Smartphone ist erstmal nicht so dringend.
Kannst ja bei uns mal vorbeischauen
@Siama
werden ALLE Nachrichten dann gelöscht oder nur die Ausgewählte?
@Siama
werden ALLE Nachrichten dann gelöscht oder nur die Ausgewählte?
bei dem script oben werden alle gelöscht. das script zum löschen einzelner muss erst noch getestet werden, bevor ich es veröffentliche.
@Siama
Danke schon mal für das Script für das gesamte löschen!
Würde mich auf das Script für die Einzel-Nachrichten-Löschen sehr freuen.
Great tutorial Thanks
Bekomme diese Fehlermeldung wenn ich das Telefon öffne...
Bekomme diese Fehlermeldung wenn ich das Telefon öffne...
Gleicher Fehler bei mir. Hilfe?
Ersetzt eure smartphone.hpp durch das hier:
class Life_my_smartphone {
idd = 88888;
name = "life_my_telephone_menu";
movingEnable = false;
enableSimulation = true;
onLoad = "[] spawn life_fnc_smartphone;";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
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])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.95;
h = 0.7 - (22 / 250);
};
class PlayerListTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.11;
y = 0.25;
w = 0.2;
h = (1 / 25);
};
class MessageTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.325;
y = 0.25;
w = 0.7;
h = (1 / 25);
};
class RandomTitleBackground:Life_RscText {
colorBackground[] = {0.588, 0.424, 0.145, 1.0};
idc = -1;
x = 0.325;
y = 0.25 + 0.3 + (1 / 25);
w = 0.7;
h = (1 / 25);
};
};
class controls {
class MessageTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88886;
text = "";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.325;
y = 0.25;
w = 0.7;
h = (1 / 25);
};
class RandomTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88890;
text = "$STR_SMARTPHONE_RANDOMTITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.325;
y = 0.25 + 0.3 + (1 / 25);
w = 0.7;
h = (1 / 25);
};
class PlayerList : Life_RscListBox {
idc = 88881;
onLBSelChanged = "[2] spawn life_fnc_smartphone;";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
x = 0.11;
y = 0.25 + (1 / 25);
w = 0.2;
h = 0.5;
};
class MessageList : Life_RscListNBox {
idc = 88882;
onLBSelChanged = "[(lbCurSel 88882)] call life_fnc_showMsg;";
//sizeEx = 0.04;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
colorBackground[] = {0, 0, 0, 0.0};
columns[] = {0,0.3};
x = 0.325;
y = 0.25 + (1 / 25);
w = 0.7;
h = 0.3;
};
class TextShow : Life_RscControlsGroup {
x = 0.325;
y = 0.25 + 0.3 + (1 / 25) + (1 / 25);
w = 0.7;
h = 0.15;
class HScrollbar : HScrollbar {
height = 0;
};
class controls {
class showText : Life_RscStructuredText {
idc = 88887;
text = "";
colorBackground[] = {0.28,0.28,0.28,0.28};
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
shadow = 0;
x = 0;
y = 0;
w = 0.69;//w = 0.7;
h = 1;//h = 2.15;
};
};
};
class Schreiben : Life_RscButtonMenu {
idc = 887892;
text = "$STR_SMARTPHONE_SCHREIBEN";
onButtonClick = "[4] call life_fnc_smartphone;";
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])", 1.0};
x = 0.11;
y = 0.25 + (1 / 25) + 0.51;
w = 0.2;
h = (1 / 25);
};
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = -1;
text = "$STR_SMARTPHONE_TITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class PlayerListTitle : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = -1;
text = "$STR_SMARTPHONE_PLAYERLISTTITLE";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.9)";
x = 0.11;
y = 0.25;
w = 0.2;
h = (1 / 25);
};
class CloseLoadMenu : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.9 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class Notruf : Life_RscButtonMenu {
idc = -1;
text = "$STR_SMARTPHONE_NOTRUF";
onButtonClick = "createDialog ""Life_smartphone_notruf"";";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
x = 0.325 + 0.7 - (6.25 / 40);
y = 0.25 + (1 / 25) + 0.51;
w = (6.25 / 40);
h = (1 / 25);
};
};
};
class Life_smartphone_schreiben{
idd = 88883;
name = "life_my_smartphone_schreiben";
movingEnable = false;
enableSimulation = true;
onLoad = "";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
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])"};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.6;
h = 0.1;
};
};
class controls {
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 88886;
text = "$STR_SMARTPHONE_NACHRICHTTITLE";
x = 0.1;
y = 0.2;
w = 0.95;
h = (1 / 25);
};
class Absenden : Life_RscButtonMenu {
idc = 88885;
text = "$STR_SMARTPHONE_ABSENDEN";
onButtonClick = "[1,-1,(ctrlText 88884)] call life_fnc_newMsg;";
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])", 1.0};
x = 0.6 - (6.25 / 40) + 0.088;
y = 0.3 + (1 / 25) - 0.048;
w = (6.25 / 40);
h = (1 / 25);
};
class AdminMsg : life_RscButtonMenu
{
idc = 888897;
text = "$STR_CELL_AdminMsg";
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])", 1.0};
onButtonClick = "[5,-1,(ctrlText 88884)] call life_fnc_newMsg;";
x = 0.6 - (6.25 / 40) - 0.121;
y = 0.3 + (1 / 25) - 0.048;
w = 0.2;
h = (1 / 25);
};
class Close : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
x = 0.11;
y = 0.3 + (1 / 25) - 0.048;
w = (6.25 / 40);
h = (1 / 25);
};
class textEdit : Life_RscEdit {
idc = 88884;
text = "";
sizeEx = 0.030;
x = 0.11; y = 0.3 - 0.048;
w = 0.58; h = 0.03;
};
};
};
class Life_smartphone_notruf {
idd = 887890;
name= "life_my_smartphone_notruf";
movingEnable = false;
enableSimulation = true;
onLoad = "[6] spawn life_fnc_newMsg;";
class controlsBackground {
class Life_RscTitleBackground:Life_RscText {
colorBackground[] = {0.584, 0.086, 0.086,1.0};
idc = -1;
x = 0.1;
y = 0.2;
w = 0.64;
h = (1 / 25);
};
class MainBackground:Life_RscText {
colorBackground[] = {0, 0, 0, 0.7};
idc = -1;
x = 0.1;
y = 0.2 + (11 / 250);
w = 0.64;
h = 0.15 - (5 / 250);
};
};
class controls {
class Title : Life_RscTitle {
colorBackground[] = {0, 0, 0, 0};
idc = 888892;
text = "$STR_SMARTPHONE_Notruftitle";
x = 0.1;
y = 0.2;
w = 0.6;
h = (1 / 25);
};
class textEdit : Life_RscEdit {
idc = 888894;
text = "";
sizeEx = 0.030;
x = 0.11; y = 0.25;
w = 0.62; h = 0.03;
};
class TxtCopButton : life_RscButtonMenu
{
idc = 888895;
text = "$STR_CELL_TextPolice";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[2,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.32;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class TxtAdminButton : life_RscButtonMenu
{
idc = 888896;
text = "$STR_CELL_TextAdmins";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[3,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.53;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class AdminMsgAll : life_RscButtonMenu
{
idc = 888898;
text = "$STR_CELL_AdminMSGAll";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[7,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.53;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class EMSReq : life_RscButtonMenu
{
idc = 888899;
text = "$STR_CELL_EMSRequest";
colorBackground[] = {0.584, 0.086, 0.086,1.0};
onButtonClick = "[4,-1,(ctrlText 888894)] call life_fnc_newMsg;";
x = 0.11;
y = 0.30;
w = 0.2;
h = (1 / 25);
};
class PoliceMsgAllButton : life_RscButtonMenu
{
idc = 3023;
text = "Rundfunk";
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};
onButtonClick = "[] call TON_fnc_cell_polizeimsgall";
x = 0.32;
y = 0.45;
w = 0.2;
h = (1 / 25);
};
class CloseButton : Life_RscButtonMenu {
idc = -1;
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
y = 0.36 + (1 / 50);
w = (6.25 / 40);
h = (1 / 25);
};
};
};
Alles anzeigen