Jump to content
  • 0

pomoc [Help] Music


-KwC-Tonny

Dotaz

Ahoj mám problém kámoš mi poslal music mu na serveru jde a mě ne místo gamemode se napíše Blank Script a když si vyberu písničku (je to přes dialog) tak tam naskoči login a register je to tím že mám jinou rze než on?

Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0
zmeň ID dialogu

/*
*                        Music Dialog v1.0
*                 (c) Copyright 2011 by (Mattos)
*
* Author: Mateus Costa de Mattos (http://www.brasilwarzone.com)
* Date: 9th december 2011
*
*/

#include 

#define MENUMUSICS 		1

#define ShowMusicDialog(%0) ShowPlayerDialog(%0, MENUMUSICS, DIALOG_STYLE_LIST, "MUSIC SYSTEM - {006600}By Mattos", "Turn Off Music\nEnter Music URL\nPop/Rock/Eletronica\nMetal\nClássic\nRap/Rip Hop\nDisco", "Select", "Cancel")

new MusicOn[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/music",true) == 0)
{
    ShowMusicDialog(playerid);
    return 1;
}
return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
   if(dialogid == MENUMUSICS && response)
{
	switch(listitem)
	{
  			case 0: // Turn Off Music
           {
               MusicOn[playerid] = 0;
               SendClientMessage(playerid, -1, "| Music off.");
		    StopAudioStreamForPlayer(playerid);
           }
           case 1: // Enter Mussic URL
		{
			if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 1), DIALOG_STYLE_INPUT,"Enter Music URL", "Enter a URL of a song with the extension .mp3\nand beginning with http://", "Play", "Cancel");
	    }
		case 2: // Pop/Rock/Eletronic
		{
			if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 2), DIALOG_STYLE_LIST, "Pop/Rock/Eletronica", "Example\nBack", "Select", "Cancel");
		}
		case 3: // Metal
           {
               if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 3), DIALOG_STYLE_LIST, "Metal", "Example\nBack", "Select", "Cancel");
		}
           case 4: // Clássic
           {
               if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 4), DIALOG_STYLE_LIST, "Clássica", "Example\nBack", "Select", "Cancel");
           }
           case 5: // Rap/Rip Hop
           {
               if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 5), DIALOG_STYLE_LIST, "Rap/Rip Hop", "Exemple\nBack", "Select", "Cancel");
           }
           case 6: // Disco
           {
               if(MusicOn[playerid] == 1) return SendClientMessage(playerid, -1, "| Turn off the music that is playing to listen to another.");

               ShowPlayerDialog(playerid, (MENUMUSICS + 6), DIALOG_STYLE_LIST, "Disco", "Example\nBack", "Select", "Cancel");
		}
       }
	return 1;
}
//==============================================================================
//                               Enter Music URL
//==============================================================================
if(dialogid == (MENUMUSICS + 1) && response)
{
	PlayAudioStreamForPlayer(playerid, inputtext);
       MusicOn[playerid] = 1;
	return 1;
}
//==============================================================================
//                          	Pop/Rock/Eletronic
//==============================================================================
if(dialogid == (MENUMUSICS + 2) && response)
{
	switch(listitem)
	{
		case 0: PlayAudioStreamForPlayer(playerid, "http://example.mp3"), MusicOn[playerid] = 1;
		case 1: ShowMusicDialog(playerid);
	}
	return 1;
}
//==============================================================================
//                             		Metal
//==============================================================================
if(dialogid == (MENUMUSICS + 3) && response)
{
	switch(listitem)
	{
		case 0: PlayAudioStreamForPlayer(playerid, "http://example.mp3"), MusicOn[playerid] = 1;
		case 1: ShowMusicDialog(playerid);
	}
	return 1;
}

//==============================================================================
//                          		 Clássica
//==============================================================================
if(dialogid == (MENUMUSICS + 4) && response)
{
	switch(listitem)
	{
		case 0: PlayAudioStreamForPlayer(playerid, "http://example.mp3"), MusicOn[playerid] = 1;
		case 1: ShowMusicDialog(playerid);
	}
	return 1;
}
//==============================================================================
//                          	   Rap/Rip Hop
//==============================================================================
if(dialogid == (MENUMUSICS + 5) && response)
{
	switch(listitem)
	{
		case 0: PlayAudioStreamForPlayer(playerid, "http://example.mp3"), MusicOn[playerid] = 1;
		case 1: ShowMusicDialog(playerid);
	}
	return 1;
}
//==============================================================================
//                                 Disco
//==============================================================================
if(dialogid == (MENUMUSICS + 6) && response)
{
	switch(listitem)
	{
		case 0: PlayAudioStreamForPlayer(playerid, "http://example.mp3"), MusicOn[playerid] = 1;
		case 1: ShowMusicDialog(playerid);
	}
	return 1;
}
return 1;
}

public OnPlayerConnect(playerid)
{
   MusicOn[playerid] = 0;
   return 1;
}

Jak to mám teda spravit?

Link to comment
Share on other sites

  • 0

Dal jsem to define dal jsem tam 459 a haze mi to errory

C:\Documents and Settings\Roman\Plocha\Music2.pwn(38) : warning 217: loose indentation
C:\Documents and Settings\Roman\Plocha\Music2.pwn(44) : warning 217: loose indentation
C:\Documents and Settings\Roman\Plocha\Music2.pwn(50) : warning 217: loose indentation
C:\Documents and Settings\Roman\Plocha\Music2.pwn(82) : warning 217: loose indentation
C:\Documents and Settings\Roman\Plocha\Music2.pwn(85) : warning 217: loose indentation
C:\Documents and Settings\Roman\Plocha\Music2.pwn(86) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


6 Warnings.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...