need help
#1

i make a new job,DJ job,but,the music dont play

Код:
if(strcmp(cmd, "/punemuzica", true) == 0 )
	{
	    if(PlayerInfo[playerid][pJob] == 17)
	    {
 			new r_nr[256];
   			r_nr = strtok(cmdtext, idx);
      		new Float:X, Float:Y, Float:Z;
     		if(!strlen(r_nr))
      		{
       			SendClientMessage(playerid, COLOR_RED, "PRO-B / 2GB /FizzFM / PlayCs / Inferno / endparty");
        	 	return 1;
       		}
        	else if(strcmp(r_nr,"PRO-B",true) == 0)
        	{
        		GetPlayerPos(playerid, X, Y, Z);
       			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Pro-B");
       			PlayAudioStreamForPlayer(playerid, "http://176.97.226.36:9999", X, Y, Z, 50.0, 1);
       			return 1;

			}
    		else if(strcmp(r_nr,"2GB",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio 2GB");
     			PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Fizz FM");
     			PlayAudioStreamForPlayer(playerid, "http://s2.freeshoutcast.com:33568/", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
				GetPlayerPos(playerid, X, Y, Z);
			 	SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio PlayCs");
     			PlayAudioStreamForPlayer(playerid, "http://31.215.210.4:2909/listen.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"Inferno",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
     			PlayAudioStreamForPlayer(playerid, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
     			return 1;
   			}
   			else if(strcmp(r_nr,"endparty",true) == 0)
   			{
   			    SendClientMessage(playerid, COLOR_RED, "Ai incheiat petrecerea!");
   			    PlayAudioStreamForPlayer(playerid, "http://176.97.226.36:9999", 0, 0, 0, 1, 1);
   			    return 1;
		    }
   			    
	  	}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "Nu esti DJ!");
	 		return 1;
 		}
	}
Reply
#2

Trying to make the /dj job play for the player or everyone around that specific player?
Reply
#3

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Trying to make the /dj job play for the player or everyone around that specific player?
yes
Reply
#4

< Sorry For Double Posting Violations >
Reply
#5

Код:
if(strcmp(cmd, "/punemuzica", true) == 0 )
	{
	    if(PlayerInfo[playerid][pJob] == 17)
	    {
 			new r_nr[256];
   			r_nr = strtok(cmdtext, idx);
      		new Float:X, Float:Y, Float:Z;
     		if(!strlen(r_nr))
      		{
       			SendClientMessage(playerid, COLOR_RED, "PRO-B / 2GB /FizzFM / PlayCs / Inferno / endparty");
        	 	return 1;
       		}
        	else if(strcmp(r_nr,"PRO-B",true) == 0)
        	{
        		GetPlayerPos(playerid, X, Y, Z);
       			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Pro-B");
       			PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", X, Y, Z, 50.0, 1);
       			return 1;

			}
    		else if(strcmp(r_nr,"2GB",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio 2GB");
     			PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Fizz FM");
     			PlayAudioStreamForPlayer(i, "http://s2.freeshoutcast.com:33568/", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
				GetPlayerPos(playerid, X, Y, Z);
			 	SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio PlayCs");
     			PlayAudioStreamForPlayer(i, "http://31.215.210.4:2909/listen.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"Inferno",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
     			PlayAudioStreamForPlayer(i, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
     			return 1;
   			}
   			else if(strcmp(r_nr,"endparty",true) == 0)
   			{
   			    SendClientMessage(playerid, COLOR_RED, "Ai incheiat petrecerea!");
   			    PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", 0, 0, 0, 1, 1);
   			    return 1;
		    }
   			    
	  	}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "Nu esti DJ!");
	 		return 1;
 		}
	}
Try this and tell me what happens.
Reply
#6

Код:
new Float:X, Float:Y, Float:Z, Float:Distance = 50.0; 
GetPlayerPos(playerid, X, Y, Z);
SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
PlayAudioStreamForPlayer(playerid, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
return 1;
try that

Hope this works for you
Reply
#7

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Which one? Lol confused me? Around the player?
i want to make a job, DJ job,when DJ type /punemuzica pro-b,I want all players are at a distance of 50 meters from dj, to hear that radio
Reply
#8

Quote:
Originally Posted by Akira297
Посмотреть сообщение
Код:
if(strcmp(cmd, "/punemuzica", true) == 0 )
	{
	    if(PlayerInfo[playerid][pJob] == 17)
	    {
 			new r_nr[256];
   			r_nr = strtok(cmdtext, idx);
      		new Float:X, Float:Y, Float:Z;
     		if(!strlen(r_nr))
      		{
       			SendClientMessage(playerid, COLOR_RED, "PRO-B / 2GB /FizzFM / PlayCs / Inferno / endparty");
        	 	return 1;
       		}
        	else if(strcmp(r_nr,"PRO-B",true) == 0)
        	{
        		GetPlayerPos(playerid, X, Y, Z);
       			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Pro-B");
       			PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", X, Y, Z, 50.0, 1);
       			return 1;

			}
    		else if(strcmp(r_nr,"2GB",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio 2GB");
     			PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Fizz FM");
     			PlayAudioStreamForPlayer(i, "http://s2.freeshoutcast.com:33568/", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
				GetPlayerPos(playerid, X, Y, Z);
			 	SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio PlayCs");
     			PlayAudioStreamForPlayer(i, "http://31.215.210.4:2909/listen.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"Inferno",true) == 0)
     		{
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
     			PlayAudioStreamForPlayer(i, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
     			return 1;
   			}
   			else if(strcmp(r_nr,"endparty",true) == 0)
   			{
   			    SendClientMessage(playerid, COLOR_RED, "Ai incheiat petrecerea!");
   			    PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", 0, 0, 0, 1, 1);
   			    return 1;
		    }
   			    
	  	}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "Nu esti DJ!");
	 		return 1;
 		}
	}
Try this and tell me what happens.
D:\Pro-Gaming v0.1 + buun\gamemodes\swnrullz.pwn(43960) : error 017: undefined symbol "i"
D:\Pro-Gaming v0.1 + buun\gamemodes\swnrullz.pwn(43975) : error 017: undefined symbol "i"
D:\Pro-Gaming v0.1 + buun\gamemodes\swnrullz.pwn(43982) : error 017: undefined symbol "i"
D:\Pro-Gaming v0.1 + buun\gamemodes\swnrullz.pwn(43989) : error 017: undefined symbol "i"
D:\Pro-Gaming v0.1 + buun\gamemodes\swnrullz.pwn(43995) : error 017: undefined symbol "i"

i need to make a for(i=0 ; i<= MAX_PLAYERS; i++) ; for i,but i dont know where
Reply
#9

Код:
if(strcmp(cmd, "/punemuzica", true) == 0 )
	{
	    if(PlayerInfo[playerid][pJob] == 17)
	    {
 		new r_nr[256];
   		r_nr = strtok(cmdtext, idx);
      		new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     		if(!strlen(r_nr))
      		{
       			SendClientMessage(playerid, COLOR_RED, "PRO-B / 2GB /FizzFM / PlayCs / Inferno / endparty");
        	 	return 1;
       		}
        	else if(strcmp(r_nr,"PRO-B",true) == 0)
        	{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
        		GetPlayerPos(playerid, X, Y, Z);
       			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Pro-B");
       			PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", X, Y, Z, 50.0, 1);
       			return 1;

			}
    		else if(strcmp(r_nr,"2GB",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio 2GB");
     			PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Fizz FM");
     			PlayAudioStreamForPlayer(i, "http://s2.freeshoutcast.com:33568/", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
			GetPlayerPos(playerid, X, Y, Z);
			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio PlayCs");
     			PlayAudioStreamForPlayer(i, "http://31.215.210.4:2909/listen.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"Inferno",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
     			PlayAudioStreamForPlayer(i, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
     			return 1;
   			}
   			else if(strcmp(r_nr,"endparty",true) == 0)
   			{
   			    SendClientMessage(playerid, COLOR_RED, "Ai incheiat petrecerea!");
   			    PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", 0, 0, 0, 1, 1);
   			    return 1;
		    }
   			    
	  	}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "Nu esti DJ!");
	 		return 1;
 		}
	}
Full code incase you didnt understand
Reply
#10

Quote:
Originally Posted by [EuG]ZeRoGoD
Посмотреть сообщение
Код:
if(strcmp(cmd, "/punemuzica", true) == 0 )
	{
	    if(PlayerInfo[playerid][pJob] == 17)
	    {
 		new r_nr[256];
   		r_nr = strtok(cmdtext, idx);
      		new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     		if(!strlen(r_nr))
      		{
       			SendClientMessage(playerid, COLOR_RED, "PRO-B / 2GB /FizzFM / PlayCs / Inferno / endparty");
        	 	return 1;
       		}
        	else if(strcmp(r_nr,"PRO-B",true) == 0)
        	{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
        		GetPlayerPos(playerid, X, Y, Z);
       			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Pro-B");
       			PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", X, Y, Z, 50.0, 1);
       			return 1;

			}
    		else if(strcmp(r_nr,"2GB",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio 2GB");
     			PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Fizz FM");
     			PlayAudioStreamForPlayer(i, "http://s2.freeshoutcast.com:33568/", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"FizzFM",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
			GetPlayerPos(playerid, X, Y, Z);
			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio PlayCs");
     			PlayAudioStreamForPlayer(i, "http://31.215.210.4:2909/listen.pls", X, Y, Z, 50.0, 1);
     			return 1;
   			}
    		else if(strcmp(r_nr,"Inferno",true) == 0)
     		{
                        new Float:X, Float:Y, Float:Z, Float:Distance = 50.0;
     			GetPlayerPos(playerid, X, Y, Z);
     			SendClientMessage(playerid, COLOR_RED, "Ai inceput mixul in ritmurile radio Inferno");
     			PlayAudioStreamForPlayer(i, "http://radioinferno.no-ip.biz:7200", X, Y, Z, 50.0, 1);
     			return 1;
   			}
   			else if(strcmp(r_nr,"endparty",true) == 0)
   			{
   			    SendClientMessage(playerid, COLOR_RED, "Ai incheiat petrecerea!");
   			    PlayAudioStreamForPlayer(i, "http://176.97.226.36:9999", 0, 0, 0, 1, 1);
   			    return 1;
		    }
   			    
	  	}
		else
		{
			SendClientMessage(playerid, COLOR_RED, "Nu esti DJ!");
	 		return 1;
 		}
	}
Full code incase you didnt understand
if i use PlayAudioStreamForPlayer(playerid, "http://46.102.252.60/tunein.php/radio/playlist.pls", X, Y, Z, 50.0, 1); with playerid, just DJ hear the radio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)