AdminMod.de https://www.adminmod.de/ |
|
Begrüssungssound beim connecten https://www.adminmod.de/viewtopic.php?t=2519 |
Seite 1 von 2 |
Autor: | Wardog [ 15.04.2002, 14:56 ] |
Betreff des Beitrags: | Begrüssungssound beim connecten |
Ich hab da ne frage, ich suche ein plugin,bei dem ein sound (für alle hörbar) abgespielt wird, wenn ein gewisser player connected...wo find ich sowas? ![]() |
Autor: | [COLA]*Whiskey [ 15.04.2002, 17:57 ] |
Betreff des Beitrags: | |
plugin_speech @ www.adminmod.org admin_speakall [wort] inne console (es gehen nicht alle wörter) |
Autor: | D@T@ [ 15.04.2002, 18:18 ] |
Betreff des Beitrags: | |
er meint vermutlich ein speek das automatisch beim connecten kommt ! |
Autor: | Biohazard1 [ 15.04.2002, 18:22 ] |
Betreff des Beitrags: | Re: Begrüssungssound beim connecten |
Zitat: Ich hab da ne frage, ich suche ein plugin,bei dem ein sound (für alle hörbar) abgespielt wird, wenn ein gewisser player connected...
Man könnte das Sank Sound Plugin in einer etwas modifizierten Variante dazu benutzen.Bio |
Autor: | brunzdulb [ 15.04.2002, 19:34 ] |
Betreff des Beitrags: | |
könnte man da nicht mit "plugin_dio_announce" irgendwie machen??? (etwas dazu programieren....) mfg cu brunzdulb |
Autor: | SN8P [ 15.04.2002, 20:33 ] |
Betreff des Beitrags: | |
Zitat: könnte man da nicht mit "plugin_dio_announce" irgendwie machen??? (etwas dazu programieren....)
Wenn ich mich nicht irre muss man nurmfg cu brunzdulb Code: public ann_timer(Timer,Repeat,HLName,HLParam) { new strName[MAX_NAME_LENGTH]; convert_string(HLParam,strName,MAX_NAME_LENGTH); if (access(ACCESS_ANNOUNCE, strName)!=0) plr_announce(strName, 1); }in das hier ändern... Code: public ann_timer(Timer,Repeat,HLName,HLParam) { new strName[MAX_NAME_LENGTH]; convert_string(HLParam,strName,MAX_NAME_LENGTH); plr_announce(strName, 1); } |
Autor: | Biohazard1 [ 15.04.2002, 20:45 ] |
Betreff des Beitrags: | |
Ok, das plugin_dio_announce ist natürlich die bessere Wahl, allerdings muß man dann noch in die Funktion plr_announce ein paar Zeilen hinein schreiben die bewirken das eine Wave Datei bei den Klienten abgespielt wird. Die entsprechenden Zeilen findet man im plugin_sank_sound. Somit ist das neue Plugin wohl eine Mischung aus plugin_dio_announce und plugin_sank_sound und müßte einen neuen Namen erhalten. Wie wäre es mit: plugin_sound_announce ? ![]() Bio |
Autor: | SN8P [ 15.04.2002, 20:57 ] |
Betreff des Beitrags: | |
gefällt mir!!! die Zeilen die noch fehlen wären dann in etwa: Code: plr_announce(strName[], lConnect=0) { new Text[MAX_TEXT_LENGTH] = ""; if (lConnect == 1) { strcat(Text, "Admin ",MAX_DATA_LENGTH); strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas connected",MAX_DATA_LENGTH); } else { strcat(Text, "Admin ",MAX_DATA_LENGTH); strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas left the game",MAX_DATA_LENGTH); } playsound(strName, "hallo.wav"); /* <----- DAS IST DIE ZEILE */ centersay(Text, 7, 25, 25, 125); } |
Autor: | SN8P [ 15.04.2002, 21:08 ] |
Betreff des Beitrags: | |
Halt! Stop! Fehler!!! Die Zeile muss folgendermassen lauten: Code: playsoundall("hallo.wav");und nicht vergessen noch Code: #include <sound>einzufügen!!! ![]() |
Autor: | Biohazard1 [ 15.04.2002, 21:10 ] |
Betreff des Beitrags: | |
Zitat: ... Die Zeile muss folgendermassen lauten:
Dann wäre das Plugin genau wie die Funktion im plugin_sank_sound, deshalb gefällt mir deine erste Variante besser.Code: playsoundall("hallo.wav"); Bio |
Autor: | brunzdulb [ 15.04.2002, 21:23 ] |
Betreff des Beitrags: | |
kann vielleicht jemand kurz den gesamten Code (die Mischung aus beiden Plugins) komplett hier rein posten??? plz ;oD mfg cu brunzy ![]() |
Autor: | SN8P [ 15.04.2002, 21:29 ] |
Betreff des Beitrags: | |
Code: /* This plugin will announce the connection/disconnection of all clients * * Setup: * 1) Setup users with 2048 access. * * Known issues: * 1) If a person with 2048 access is the first to join the server after a map * change, they may recieve a warning message in the console. That ADMIN * cannot find the user. Ignore it. :) * * This seems to be due to AM loading the users.ini and not finding the user * in time to validate the accesslevel. * * This is just a test but for v2.50.1 I have added a timer so that after 20 * seconds from the connection, the announcment is attempted. * * thanx to [fah-q] Dio * * changes by SN8P */ #include <core> #include <console> #include <string> #include <admin> #include <adminlib> #include <sound> #define ACCESS_ANNOUNCE 2048 #define ANNOUNCE_DELAY 20 new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.1"; plr_announce(strName[], lConnect=0) { new Text[MAX_TEXT_LENGTH] = ""; new Red = 0; new Green = 255; new Blue = 0; if (lConnect == 0) { strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas connected",MAX_DATA_LENGTH); Red = 25; Green = 25; Blue = 125; } if (lConnect == 1) { strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas left the game",MAX_DATA_LENGTH); Red = 25; Green = 25; Blue = 125; } if (lConnect == 2) { strcat(Text, "Admin ",MAX_DATA_LENGTH); strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas connected",MAX_DATA_LENGTH); Red = 125; Green = 25; Blue = 25; } if (lConnect == 3) { strcat(Text, "Admin ",MAX_DATA_LENGTH); strcat(Text, strName,MAX_DATA_LENGTH); strcat(Text, "^nhas left the game",MAX_DATA_LENGTH); Red = 125; Green = 25; Blue = 25; } /* für alle den sound ausgeben */ // playsoundall("greetings.wav"); /* oder nur für den Der connected */ // playsound(strName, "greetings.wav"); centersay(Text, 7, Red, Green, Blue); } public plugin_connect(HLUserName, HLIP, UserIndex) { new strName[MAX_NAME_LENGTH]; convert_string(HLUserName, strName, MAX_NAME_LENGTH); set_timer("ann_timer",ANNOUNCE_DELAY, 1, strName); return PLUGIN_CONTINUE; } public plugin_disconnect(HLUserName, UserIndex) { new strName[MAX_NAME_LENGTH]; convert_string(HLUserName, strName, MAX_NAME_LENGTH); if (access(ACCESS_ANNOUNCE, strName)!=0) plr_announce(strName, 2); else plr_announce(strName, 0); return PLUGIN_CONTINUE; } public ann_timer(Timer,Repeat,HLName,HLParam) { new strName[MAX_NAME_LENGTH]; convert_string(HLParam,strName,MAX_NAME_LENGTH); if (access(ACCESS_ANNOUNCE, strName)!=0) plr_announce(strName, 3); else plr_announce(strName, 1); } public plugin_init() { plugin_registerinfo("Admin Connection Announcment Plugin","Announces the (dis)connection of players with correct access level.",STRING_VERSION); return PLUGIN_CONTINUE; }!ACHTUNG! Bitte noch (ungefär Mitte) entscheiden welche sound-announce-variente man möchte !!! |
Autor: | Wardog [ 16.04.2002, 04:29 ] |
Betreff des Beitrags: | Hm...ok...naja |
![]() ![]() ![]() ![]() Wardog |
Autor: | SN8P [ 16.04.2002, 05:02 ] |
Betreff des Beitrags: | |
Du weisst wo dein AdminMod-Directory ist ?!? da gibt es ein Unterverzeichnis namens '..\scripting\myscripts\'... In diesem Verzeichnis legst Du eine neue Textdatei an, kopierst den obigen Inhalt hinein und speicherst sie unter 'plugin_sound_announce.sma' ab. Dann startest Du die 'compile_all.bat' und wechselst - falls keine Fehler auftauchen - ins Verzeichnis '..\scripting\mybinaries\'. Dort findest Du die entsprechende *.amx Datei... ab hier weisst Du ja dann selber weiter... ![]() |
Autor: | brunzdulb [ 16.04.2002, 09:49 ] |
Betreff des Beitrags: | |
muss man nur den folgenden Code reinsetzten??? /* für alle den sound ausgeben */ // playsoundall("greetings.wav"); /* oder nur für den Der connected */ // playsound(strName, "greetings.wav"); centersay(Text, 7, Red, Green, Blue); (das man bei der Option, die man haben möchte das // wegmachen muss, weiss ich... möcht nur wissen, ob nur das für die sounds hinzugefügt wurde...) mfg cu Brunzdulb ![]() |
Autor: | SN8P [ 16.04.2002, 09:58 ] |
Betreff des Beitrags: | |
JA! |
Autor: | Outspan [ 16.04.2002, 15:29 ] |
Betreff des Beitrags: | sound.inc |
hm... ich hab gerade mal versucht, das teil zu kompilieren... dummerweise kennt mein adminmod aber die sound.inc, die verwendet wird, nicht. kann mir jemand helfen? thx im voraus |
Autor: | SN8P [ 16.04.2002, 17:01 ] |
Betreff des Beitrags: | |
http://www.adminmod.org/ascript/downloa ... rea=plugin |
Autor: | Outspan [ 16.04.2002, 18:59 ] |
Betreff des Beitrags: | thx |
yo, danke... aber die sound.inc ist auch da nicht enthalten... entweder mach ich irgendwas falsch oder... |
Autor: | Biohazard1 [ 16.04.2002, 19:10 ] |
Betreff des Beitrags: | |
Die sound.inc ist beim plugin_sank_sound dabei. Bio |
Seite 1 von 2 | Alle Zeiten sind UTC+01:00 |
Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |