Da kommen wir der Sache doch etwas näher
Und in diese kann ich dann das Script ablegen? Oder wie?
Da kommen wir der Sache doch etwas näher
Und in diese kann ich dann das Script ablegen? Oder wie?
du legst gar nix ab... Dateie rstellen, eintragen was ich gesgt hatte, fertig.
OKay, ich werde es mal testen und dann rückmelden
Hey, ich habe das ganze jetzt mal ausprobiert und es funktioniert...
Allerdings bräuchte ich jetzt noch mal Hilfe, wie ich ein von mir geschriebenes SQF Script ausführe.
expression = "[Argumente] all code_fnc_meineFunktion"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
Wie kann ich dort jetzt das entsprechende Script ausführen?
Des weiteren hätte ich noch die Frage ob ich die Meldung: "Neue Unterstüzung Verfügbar" umändern kann.
Lg, fixle2011.
Allerdings bräuchte ich jetzt noch mal Hilfe, wie ich ein von mir geschriebenes SQF Script ausführe.
du definierst das Script als Funktion (https://community.bistudio.com/wiki/Functions…ding_a_Function) und rufst es auf im expression Parameter
Des weiteren hätte ich noch die Frage ob ich die Meldung: "Neue Unterstüzung Verfügbar" umändern kann.
BIS_fnc_addCommMenuItem nimmt im Alt-Syntax eine Custom Notification als Parameter. Heißt:
class CfgNotifications
{
class MeineMeldung
{
title = "Neue Funksprüche verfügbar"; // Title displayed as text on black background. Filled by arguments.
iconPicture = "A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; // Small icon displayed in left part. Colored by "color", filled by arguments.
iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
description = ""; // Brief description displayed as structured text. Colored by "color", filled by arguments.
color[] = {1,1,1,1}; // Icon and text color
duration = 5; // How many seconds will the notification be displayed
priority = 10; // Priority; higher number = more important; tasks in queue are selected by priority
difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};
};
Alles anzeigen
Den Aufruf [player,"MeldungFordern"] call BIS_fnc_addCommMenuItem; anpassen zu [player,"MeldungFordern",nil,nil,"MeineMeldung"] call BIS_fnc_addCommMenuItem; (siehe https://community.bistudio.com/wiki/BIS_fnc_addCommMenuItem)
Fertig.
class CfgCommunicationMenu
{
class MeldungFordern
{
text = "Funk Basis"; // Text displayed in the menu and in a notification
submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "[Argumente] all code_fnc_meineFunktion"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};
class CfgNotifications
{
class FunkmeldungVerfügbar
{
title = "Neue Funkmeldung verfügbar"; // Title displayed as text on black background. Filled by arguments.
iconPicture = "A3\ui_f\data\map\mapcontrol\call_ca.paa"; // Small icon displayed in left part. Colored by "color", filled by arguments.
iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
description = ""; // Brief description displayed as structured text. Colored by "color", filled by arguments.
color[] = {1,1,1,1}; // Icon and text color
duration = 5; // How many seconds will the notification be displayed
priority = 10; // Priority; higher number = more important; tasks in queue are selected by priority
difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};
Alles anzeigen
Linie 20 macht er mir Probleme
class FunkmeldungVerfügbar
keine Sonderzeichen in Classnames, Zahlen und Unterstriche nie an 1. Stelle.
class CfgCommunicationMenu
{
class MeldungFordern
{
text = "Funk Basis"; // Text displayed in the menu and in a notification
submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "[Argumente] all code_fnc_meineFunktion"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};
class CfgNotifications
{
class FunkmeldungVerfuegbar
{
title = "Neue Funkmeldung verfügbar"; // Title displayed as text on black background. Filled by arguments.
iconPicture = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Small icon displayed in left part. Colored by "color", filled by arguments.
iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
description = ""; // Brief description displayed as structured text. Colored by "color", filled by arguments.
color[] = {1,1,1,1}; // Icon and text color
duration = 5; // How many seconds will the notification be displayed
priority = 10; // Priority; higher number = more important; tasks in queue are selected by priority
difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};
};
Alles anzeigen
So funktioniert das ganze, aber ich krige den Text über die descrption oder den iconText nicht in den Kasten
welchen Text? bei description kannst du ne Meldung definieren
class CfgFunctions
{
class Funkmeldung
{
class Funkemldung
{
class Funkmeldungexe {file = "scripts\chat1.sqf";};
};
};
};
class CfgCommunicationMenu
{
class MeldungFordern
{
text = "Funk Basis"; // Text displayed in the menu and in a notification
submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "[Argumente] all code_fnc_Funkmeldung"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};
class CfgNotifications
{
class FunkmeldungVerfuegbar
{
title = "Neue Funkmeldung verfügbar"; // Title displayed as text on black background. Filled by arguments.
iconPicture = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Small icon displayed in left part. Colored by "color", filled by arguments.
iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
description = "Neue Funkmeldung verfügbar"; // Brief description displayed as structured text. Colored by "color", filled by arguments.
color[] = {1,1,1,1}; // Icon and text color
duration = 5; // How many seconds will the notification be displayed
priority = 10; // Priority; higher number = more important; tasks in queue are selected by priority
difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};
};
Alles anzeigen
Soweit so gut, jetzt spielt er mir aber immer noch nicht mein Script ab .
Lies dir bitte den Abschnitt nochmal genau durch: https://community.bistudio.com/wiki/Functions…ding_a_Function
Das habe ich jetzt getan und auch den Tag entsprechend hinzugefügt. Allerdings will das ganze immer noch nicht so recht. Irgendwas mit den Argumenten.
class CfgFunctions
{
class Funkmeldung
{
class FunkmeldungBasis
{
tag = "Funkmeldung"; //Tag Name
}
}
}
class CfgFunctions
{
class Funkmeldung
{
class Funkmeldung1
{
class Funkmeldungexe {file = "scripts\chat1.sqf";}; //Funktionsname
};
};
};
class CfgCommunicationMenu
{
class MeldungFordern
{
text = "Funk Basis"; // Text displayed in the menu and in a notification
submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
expression = "[Argumente] all Funkmeldung_fnc_Funkmeldungexe"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Icon displayed permanently next to the command menu
cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
enable = "1"; // Simple expression condition for enabling the item
removeAfterExpressionCall = 1; // 1 to remove the item after calling
};
};
class CfgNotifications
{
class FunkmeldungVerfuegbar
{
title = "Neue Funkmeldung verfügbar"; // Title displayed as text on black background. Filled by arguments.
iconPicture = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca"; // Small icon displayed in left part. Colored by "color", filled by arguments.
iconText = ""; // Short text displayed over the icon. Colored by "color", filled by arguments.
description = "Neue Funkmeldung verfügbar"; // Brief description displayed as structured text. Colored by "color", filled by arguments.
color[] = {1,1,1,1}; // Icon and text color
duration = 5; // How many seconds will the notification be displayed
priority = 10; // Priority; higher number = more important; tasks in queue are selected by priority
difficulty[] = {}; // Required difficulty settings. All listed difficulties has to be enabled
};
};
Alles anzeigen
expression = "[Argumente] all Funkmeldung_fnc_Funkmeldungexe"; // Code executed upon activation -> im Beispiel Aufruf zu deinem Script
[Argumente] call Funkmeldung_fnc_Funkmeldungexe sorry
Kein Ding, danke!
So, das ganze funktioniert mit dem obrigen, verbesserten Code (call statt all), immer noch nicht. Er meckert wegen CfgFunctions Member already defined line 27. Ich habe mir den Code zich tausend mal angeguckt, aber meinen Fehler nicht gefunden. Vielleicht seht Ihr ihn ja.
So, das ganze funktioniert mit dem obrigen, verbesserten Code (call statt all), immer noch nicht. Er meckert wegen CfgFunctions Member already defined line 27. Ich habe mir den Code zich tausend mal angeguckt, aber meinen Fehler nicht gefunden. Vielleicht seht Ihr ihn ja.
weil du (warum auch immer) 2x ne CfgFunctions hast
Das heißt ich kann den Tag auch einfach in der anderen definieren?
Das heißt ich kann den Tag auch einfach in der anderen definieren?
du kannst nicht 2x die gleiche class haben... das muss alles in einer vereint sein
Okay, funktioniert