Das radio spielt leider nichts ab
ocmd:radio(playerid,params[])
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid, DIALOG_RADIO,DIALOG_STYLE_LIST, "Radio System", "JamFM.\nHardbase.FM\nRadio Aus", "Weiter", "Abbrechen");
}
return 1;
}
ocmd:radioaus(playerid,params[])
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid,GREEN,"Radio ausgeschaltet!");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_PASSWORD,"Register","Das angegebene Passwort war zu Kurtz...\nBitte Registrier dich jetzt mit einem Passwort:","Register","Abbrechen");
return 1;
}
else
{
CreateAccount(playerid, inputtext);
SetPVarInt(playerid,"Eingeloggt",1);
SpawnPlayer(playerid);
return 1;
}
}
else
{
Kick(playerid);
}
}
case DIALOG_LOGIN:
{
if(response)
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Das Angegebene Passwort war Falsch.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
return 1;
}
else
{
new SpielerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, SpielerName, MAX_PLAYER_NAME);
if(!strcmp(inputtext, mysql_ReturnPasswort(SpielerName), true))
{
SetPVarInt(playerid,"Eingeloggt",1);
LoadPlayer(playerid);
SpawnPlayer(playerid);
return 1;
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das war das Falsche Passwort.\nBitte log dich jetzt mit dem richtigen Passwort ein:","Login","Abbrechen");
return 1;
}
}
}
else
{
Kick(playerid);
}
if(dialogid == DIALOG_RADIO)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid, 0x00ABFFFF, "Technobase.FM!");
PlayAudioStreamForPlayer(playerid, "http://listen.technobase.fm/dsl.pls");
}
if(listitem == 1)
{
SendClientMessage(playerid, 0x00ABFFFF, "JAM FM!");
PlayAudioStreamForPlayer(playerid, "http://www.jam.fm/streams/jam-nmr-mp3.pls");
}
if(listitem == 2)
{
SendClientMessage(playerid, 0x00ABFFFF, "Radio Aus!");
StopAudioStreamForPlayer(playerid);
}
return 1;
}
}
}
}
return 1;
}