Durch Radioauswahl = Kicks?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Wollt nochmal hinzufügen, dass ich ein Login/Registersystem habe!


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(response) {
    switch(dialogid == 1)
    {
    case 1: {
    switch(listitem)
    {
    case 0: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://listen.clubtime.fm/tunein-aacplus-pls");
    }
    case 1: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/tunein-aacplus-pls");
    }
    case 2: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://bigfm.inlimedia.com/bigfm/bigfm_wma_playlist96.m3u");
    }
    case 3: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://rpr1.fmstreams.de/stream1");
    }
    case 4: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://gffstream.ic.llnwd.net/stream/gffstream_stream_wdr_einslive_a");
    }
    case 5: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://stream.blackbeats.fm/");
    }
    case 6: {
    StopAudioStreamForPlayer(playerid);
    }
    }
    }
    }
    }
    return 1;
    }

  • Nein, die ID 1 taucht nur bei dem Radio-Dialog auf.


    Kann es vllt. daran liegen?

    Zitat

    Wie ich mir das ansehe! Gut gescriptet.
    Aber leider wirst du wahrscheinlich auch das Problem haben sowie ich bei meinem, das wenn man das in einem Gamemode mit Login&Registersystem hat,
    das er sich immer wieder neueinloggt :).

    Wie kann ich das beheben? Oder kann jemand mit Login/Regi system kein Radio besitzen?

  • Es könnte natürlich auch sein, dass die Stream Funktionen in dem Include anders verknüpft sind.


    Aber die möglichste Variante ist die mit den ID´s.


    Es wäre nett mal uns die definitionen deiner gesamten! Dialoge zu zeigen.


    #JoKér

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • #define radio 999
    #define login 111
    #define regis 222
    #define weathermenu 444
    #define adminmsg 777
    #define adminweapons 888
    #define commands0 999
    #define commands1 1111
    #define commands2 2222
    #define commands3 3333
    #define commands32 3332
    #define commands4 4444
    #define commands42 4442
    #define commands5 5555
    #define commands52 5552
    #define adminkick 1
    #define adminban 2
    #define adminheal 3
    #define adminkill 4
    #define adminarmo 5


    Dialogs:



    if(response == 1) {
    switch(dialogid == radio)
    {
    case 1: {
    switch(listitem)
    {
    case 0: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://listen.clubtime.fm/tunein-aacplus-pls");
    }
    case 1: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/tunein-aacplus-pls");
    }
    case 2: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://bigfm.inlimedia.com/bigfm/bigfm_wma_playlist96.m3u");
    }
    case 3: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://rpr1.fmstreams.de/stream1");
    }
    case 4: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://gffstream.ic.llnwd.net/stream/gffstream_stream_wdr_einslive_a");
    }
    case 5: {
    StopAudioStreamForPlayer(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    PlayAudioStreamForPlayer(playerid, "http://stream.blackbeats.fm/");
    }
    case 6: {
    StopAudioStreamForPlayer(playerid);
    }
    }
    }
    }
    }


    if(dialogid == login)
    {
    if(response == 1)
    {
    new Spielerdatei[256];
    new SpielerName[MAX_PLAYER_NAME];
    if(!strlen(inputtext))return ShowPlayerDialog(playerid, login, DIALOG_STYLE_INPUT, "[GF] Logge dich ein!", " ", "Login!", "Abbrechen!");
    GetPlayerName(playerid,SpielerName,sizeof(SpielerName));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",SpielerName);
    SpielerInfo[playerid][Passwort] = strval(dini_Get(Spielerdatei,"Passwort"));
    SpielerInfo[playerid][Kills] = strval(dini_Get(Spielerdatei,"Kills"));
    SpielerInfo[playerid][Tode] = strval(dini_Get(Spielerdatei,"Tode"));
    SpielerInfo[playerid][Spawn] = strval(dini_Get(Spielerdatei,"Spawn"));
    SpielerInfo[playerid][Geld] = strval(dini_Get(Spielerdatei,"Geld"));
    if(strcmp(inputtext,SpielerInfo[playerid][Passwort],false) == 0)
    {
    Anmelden(playerid);
    pFirstLog[playerid] = false;
    }
    else
    {
    FalschesPasswort[playerid] += 1;
    PasswortFalsch(playerid);
    }
    }
    }


    if(dialogid == regis)
    {
    if(response == 1)
    {
    new Spielerdatei[256];
    new SpielerName[MAX_PLAYER_NAME];
    SpielerInfo[playerid][alvl] = 0;
    GetPlayerName(playerid,SpielerName,sizeof(SpielerName));
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",SpielerName);
    dini_Create(Spielerdatei);
    if(!strlen(inputtext))return ShowPlayerDialog(playerid, regis, DIALOG_STYLE_INPUT, "[GF] Registriere dich!", " ", "Registrieren!", "Abbrechen!");
    dini_Set(Spielerdatei,"Passwort",inputtext);
    dini_IntSet(Spielerdatei,"Wanteds",SpielerInfo[playerid][Wanteds]);
    dini_IntSet(Spielerdatei,"Geld",SpielerInfo[playerid][Geld]);
    dini_IntSet(Spielerdatei,"AdminLevel",SpielerInfo[playerid][alvl]);
    dini_IntSet(Spielerdatei,"Kills",SpielerInfo[playerid][Kills]);
    dini_IntSet(Spielerdatei,"Tode",SpielerInfo[playerid][Tode]);
    dini_IntSet(Spielerdatei,"Spawn",SpielerInfo[playerid][Spawn]);
    dini_IntSet(Spielerdatei,"Geld",SpielerInfo[playerid][Geld]);
    new GlueckWunschText[256];
    format(GlueckWunschText,sizeof(GlueckWunschText),"[GF] Du hast dich erfolgreich mit den Name : %s und dem Passwort : %s registriert",SpielerName,inputtext);
    SendClientMessage(playerid,COLOR_RED,GlueckWunschText);
    Anmelden(playerid);
    SendClientMessage(playerid,COLOR_RED,"[GF] Du wurdest automatisch eingloggt!");
    pFirstLog[playerid] = true;
    if(pFirstLog[playerid] == true)
    {
    GivePlayerMoney(playerid,50000);
    }
    SpielerUpdate(playerid);
    }
    }


    if(dialogid == adminkick)
    {
    if(response == 1)
    {
    new name[MAX_PLAYER_NAME], string[256];
    GetPlayerName(clpl, name, sizeof(name));
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string, sizeof(string), "[AdmCmd] %s wurde von %s gekickt.", name, aname);
    SendClientMessageToAll(COLOR_RED, string);
    Kick(clpl);
    clpl = 0;


    }
    }
    if(dialogid == adminban)
    {
    if(response == 1)
    {
    Ban(clpl);
    clpl = 0;
    }


    }
    if(dialogid == adminheal)
    {
    if(response == 1)
    {
    SetPlayerHealth(clpl, 100);
    clpl = 0;
    }
    }
    if(dialogid == adminkill)
    {
    if(response == 1)
    {
    SetPlayerHealth(clpl, 0);
    clpl = 0;
    }
    }
    if(dialogid == adminarmo)
    {
    if(response == 1)
    {
    SetPlayerArmour(clpl, 100);
    clpl = 0;
    }
    }
    if(dialogid == weathermenu)
    {
    if(listitem == 0)
    {
    SetWeather(0);
    new aname[MAX_PLAYER_NAME], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string2, sizeof(string2), "[AdmCmd] %s hat das Wetter auf Schönwetter gesetzt.", aname);
    SendClientMessageToAll(COLOR_RED, string2);
    }
    if(listitem == 1)
    {
    SetWeather(5);
    new aname[MAX_PLAYER_NAME], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string2, sizeof(string2), "[AdmCmd] %s hat das Wetter auf bewölkt gesetzt.", aname);
    SendClientMessageToAll(COLOR_RED, string2);
    }
    if(listitem == 2)
    {
    SetWeather(11);
    new aname[MAX_PLAYER_NAME], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string2, sizeof(string2), "[AdmCmd] %s hat das Wetter auf extreme Hitze gesetzt.", aname);
    SendClientMessageToAll(COLOR_RED, string2);
    }
    if(listitem == 3)
    {
    SetWeather(16);
    new aname[MAX_PLAYER_NAME], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string2, sizeof(string2), "[AdmCmd] %s hat das Wetter auf Regen gesetzt.", aname);
    SendClientMessageToAll(COLOR_RED, string2);
    }
    if(listitem == 4)
    {
    SetWeather(19);
    new aname[MAX_PLAYER_NAME], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    format(string2, sizeof(string2), "[AdmCmd] %s hat das Wetter auf Sandsturm gesetzt.", aname);
    SendClientMessageToAll(COLOR_RED, string2);
    }
    }
    if(dialogid == adminmsg)
    {
    if(response == 1)
    {
    new aname[MAX_PLAYER_NAME], clpln[MAX_PLAYER_NAME], string[256], string2[256];
    GetPlayerName(playerid, aname, sizeof(aname));
    GetPlayerName(clpl, clpln, sizeof(clpln));
    format(string2, sizeof(string2), "[AdmMsg] %s: %s", aname, inputtext);
    SendClientMessage(clpl,COLOR_RED, string2);
    clpl = 0;
    format(string, sizeof(string), "[AdmMsg] an %s: %s", clpln, inputtext);
    SendClientMessage(playerid, COLOR_RED, string);
    }
    }
    if(dialogid == adminweapons)
    {
    if(response == 1)
    {
    switch(listitem)
    {
    case 0: ShowPlayerDialog(playerid, 8778, 2, "Schlagwaffen", "Schlagring\nGolfschläger\nSchlagstock\nMesser\nBaseballschläger\nSchaufel\nBilliardstock\nKatana\nKettensäge\nLilaner Dildo\nKleiner Dildo\nlanger Vibrator\nGroßer Vibrator\nBlumen\nSpazierstock", "Gib mir!", "Doch nicht!");
    case 1: ShowPlayerDialog(playerid, 8779, 2, "Wurfwaffen", "Granaten\nTränengas\nMolotowcocktail", "Gib mir!", "Doch nicht!");
    case 2: ShowPlayerDialog(playerid, 8780, 2, "Pistolen", "9mm\n9mm + Schalldämpfer\nDesert Eagle", "Gib mir!", "Doch nicht!");
    case 3: ShowPlayerDialog(playerid, 8781, 2, "Schrotflinten", "Schrotflinte\nAbgesägte Schrotflinte\nAutomatische Schrotflinte", "Gib mir!", "Doch nicht!");
    case 4: ShowPlayerDialog(playerid, 8782, 2, "(Micro-)SMG's", "Micro SMG\nMP5\nTEC-9", "Gib mir!", "Doch nicht!");
    case 5: ShowPlayerDialog(playerid, 8783, 2, "Gewehre", "AK47\nM4\nCountry Rifle\nSniper Rifle", "Gib mir!", "Doch nicht!");
    case 6: ShowPlayerDialog(playerid, 8784, 2, "Schweres Geschütz", "Raketenwerfer\nHS-Raketenwerfer\nFlammenwerfer\nMinigun", "Gib mir!", "Doch nicht!");
    case 7: ShowPlayerDialog(playerid, 8785, 2, "Verschiedenes", "Spraydose\nFeuerlöscher\nKamera", "Gib mir!", "Doch nicht!");
    case 8: ShowPlayerDialog(playerid, 8786, 2, "Itens", "Nachtsichtgerät\nInfrarotsichtbrille\nFallschirm", "Gib mir!", "Doch nicht!");
    case 9: ShowPlayerDialog(playerid, 8787, 2, "Rucksackbomben", "Rucksackbomben\nFernbedienung", "Gib mir!", "Doch nicht!");
    }
    }
    }
    if(dialogid == 8778)
    {
    if(response == 1)
    {
    new weapons[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8779)
    {
    if(response == 1)
    {
    new weapons[] = {16,17,18};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8780)
    {
    if(response == 1)
    {
    new weapons[] = {22,23,24};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8781)
    {
    if(response == 1)
    {
    new weapons[] = {25,26,27};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8782)
    {
    if(response == 1)
    {
    new weapons[] = {28,29,32};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8783)
    {
    if(response == 1)
    {
    new weapons[] = {30,31,33,34};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8784)
    {
    if(response == 1)
    {
    new weapons[] = {35,36,37,38};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8785)
    {
    if(response == 1)
    {
    new weapons[] = {41,42,43,44};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8786)
    {
    if(response == 1)
    {
    new weapons[] = {44,45,46};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == 8787)
    {
    if(response == 1)
    {
    new weapons[] = {39,40};
    return GivePlayerWeapon(playerid, weapons[listitem], 99999999999999);
    }
    }
    if(dialogid == commands3)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands32, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 3 [2/2]", "/setmoney\n/weathermenu\n/weaponmenu", "OK", "Zurück");
    }
    }
    if(dialogid == commands4)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands42, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 4 [2/2]", "/setmoney\n/weathermenu\n/weaponmenu\n/getallhere\n/v\n/god\n/ungod\n/pgod\n/pungod\n/fuckup\n/destroy\n/jetpack\n/ame\n/explode\n/mapport\n/unmapport\n/savepos\n/gotopos\n/aweap", "OK", "Zurück");
    }
    }
    if(dialogid == commands5)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands52, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 5 [2/2]", "/aond\n/aondoff\n/setmoney\n/weathermenu\n/weaponmenu\n/getallhere\n/v\n/god\n/ungod\n/pgod\n/pungod\n/fuckup\n/destroy\n/jetpack\n/ame\n/explode\n/mapport\n/unmapport\n/savepos\n/gotopos\n/aweap\n/setadmin\n/reloadbans\n/slock\n/sunlock\n/gravity\n/co", "OK", "Zurück");
    }
    }
    if(dialogid == commands32)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands3, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 3 [1/2]", "/stats\n/me\n/admins\n/rules\n/login\n/kick\n/cc\n/o bzw. /ooc\n/a\n/killp\n/ban\n/cage\n/heal\n/armour\n/freeze\n/unfreeze\n/sethp\n/setarmour\n/slap\n/giveweapon\n/goto\n/gethere\n/settime\n/bring\n/eject\n/givemoney\n/repair\n/setskin\n/fix\n/disarm\n/respawn\n/setweather\n/gametext\n/setscore\n/mute\n/unmute\n/nos\n/hydraulics\n/jail\n/unjail\n/getin\n/para", "OK", "Weiter");
    }
    }
    if(dialogid == commands42)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands4, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 4 [1/2]", "/stats\n/me\n/admins\n/rules\n/login\n\n/kick\n/cc\n/o bzw. /ooc\n/a\n/killp\n/ban\n/cage\n/heal\n/armour\n/freeze\n/unfreeze\n/sethp\n/setarmour\n/slap\n/giveweapon\n/goto\n/gethere\n/settime\n/bring\n/eject\n/givemoney\n/repair\n/setskin\n/fix\n/disarm\n/respawn\n/setweather\n/gametext\n/setscore\n/mute\n/unmute\n/nos\n/hydraulics\n/jail\n/unjail\n/getin\n/para", "OK", "Weiter");
    }
    }
    if(dialogid == commands52)
    {
    if(response == 0)
    {
    return ShowPlayerDialog(playerid, commands5, DIALOG_STYLE_LIST, "[GF] Befehle für Adminlevel 5 [1/2]", "/stats\n/me\n/admins\n/rules\n/login\n/kick\n/cc\n/o bzw. /ooc\n/a\n/killp\n/ban\n/cage\n/heal\n/armour\n/freeze\n/unfreeze\n/sethp\n/setarmour\n/slap\n/giveweapon\n/goto\n/gethere\n/settime\n/bring\n/eject\n/givemoney\n/repair\n/setskin\n/fix\n/disarm\n/respawn\n/setweather\n/gametext\n/setscore\n/mute\n/unmute\n/nos\n/hydraulics\n/jail\n/unjail\n/getin\n/para", "OK", "Weiter");
    }
    }
    return 1;
    }


    Radio == 99


    Ich hoffe ihr könnt mir helfen