SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/06/2013, 10:58 AM   #1
xganyx
Gangsta
 
xganyx's Avatar
 
Join Date: May 2013
Posts: 675
Reputation: 7
Default Help Please AudioStream

here is the code:
Code:
case DIALOG_MUSIC:
		{
		    if(response)
		    {
		        switch(listitem)
		        {
		            case 0:
		            {
		                PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Noi-Anh-Khong-Thuoc-Ve-365DaBand/knJntLmalSzJgnHTZDJyvHLn");
					}
					case 1:
					{
					    PlayAudioStreamForPlayer(playerid,"http://data.chiasenhac.com/downloads/1084/0/1083514-60fff019/128/Forever%20Alone%20Touliver%20Remix_%20-%20JustaTee%20[MP3%20128kbps].mp3");
					}
					case 2
					{
					    PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Vut-Bay-Young-Generation-Thanh-Bui-Noo-Phuoc-Thinh-Dong-Nhi-Ong-Cao-Thang-Si-Thanh-Thanh-Tam-Tam-Tit-365DaBand-JustaTee-Kimmese-Mr-T/ZmJnTkmNlpdGzZhykFxybmkH");
					}
					case 3:
					{
						StopAudioStreamForPlayer(playerid);
					}
				}
			}
		}
	}
    return 1;
}
error :
Code:
error 029: invalid expression, assumed zero
help
__________________
xganyx is offline   Reply With Quote
Old 30/06/2013, 11:00 AM   #2
Sulps
Big Clucker
 
Sulps's Avatar
 
Join Date: Jun 2013
Location: Locating....
Posts: 132
Reputation: 1
Default Re: Help Please AudioStream

Wierd
Sulps is offline   Reply With Quote
Old 30/06/2013, 11:01 AM   #3
SsHady
Gangsta
 
SsHady's Avatar
 
Join Date: Mar 2012
Location: Locating.... Reputation: 1,828
Posts: 544
Reputation: 78
Default Re: Help Please AudioStream

Try this
pawn Code:
case DIALOG_MUSIC:
{
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Noi-Anh-Khong-Thuoc-Ve-365DaBand/knJntLmalSzJgnHTZDJyvHLn");
                    }
                    case 1:
                    {
                        PlayAudioStreamForPlayer(playerid,"http://data.chiasenhac.com/downloads/1084/0/1083514-60fff019/128/Forever%20Alone%20Touliver%20Remix_%20-%20JustaTee%20[MP3%20128kbps].mp3");
                    }
                    case 2
                    {
                        PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Vut-Bay-Young-Generation-Thanh-Bui-Noo-Phuoc-Thinh-Dong-Nhi-Ong-Cao-Thang-Si-Thanh-Thanh-Tam-Tam-Tit-365DaBand-JustaTee-Kimmese-Mr-T/ZmJnTkmNlpdGzZhykFxybmkH");
                    }
                    case 3:
                    {
                        StopAudioStreamForPlayer(playerid);
                    }
              }
       }
    return 1;
}
SsHady is offline   Reply With Quote
Old 30/06/2013, 11:03 AM   #4
xganyx
Gangsta
 
xganyx's Avatar
 
Join Date: May 2013
Posts: 675
Reputation: 7
Default Re: Help Please AudioStream

here is full code :
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if (response)
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""WHITE"Registering...",""RED"You have entered an invalid password.\n"WHITE"Type your password below to register a new account.","Register","Quit");
                }

                if(INI_Open(getINI(playerid))) {
                INI_WriteString("Password",inputtext);
                INI_WriteInt("Score",1);
                INI_WriteInt("Cash",5000);
                INI_WriteInt("Admin",0);

                INI_Save();
                INI_Close();

                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""WHITE"Login",""WHITE"Type your password below to login.","Login","Quit");
            }
        }
    }
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(!strlen(inputtext)) {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Login",""RED"You have entered an invalid password.\n"WHITE"Type your password below to login.","Login","Quit");
                }

                if(INI_Open(getINI(playerid))) {
                INI_ReadString(PlayerInfo[playerid][pPass],"Password",20);

                if(strcmp(inputtext,PlayerInfo[playerid][pPass],false)) {
                ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""WHITE"Login",""RED"You have entered an incorrect password.\n"WHITE"Type your password below to login.","Login","Quit");
                }

                SetPlayerScore( playerid, INI_ReadInt("Score" ) );
                ResetPlayerMoney( playerid );
                GivePlayerMoney( playerid, INI_ReadInt( "Cash" ) );
                PlayerInfo[playerid][pAdmin] = INI_ReadInt("Admin");
                INI_Close();
                }
            }
        }
        case DIALOG_ID_NEON:
        {
        	if(response)
        	{
        	    switch(listitem)
        	    {
		    		case 0:
		    		{
                        SetPVarInt(playerid, "Status", 1);
					    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
					    SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
   		                AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
					    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
					    SetPlayerTime(playerid,0,0);
				    }
				    case 1:
				    {
                        SetPVarInt(playerid, "Status", 1);
			         	SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
			         	SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	SetPlayerTime(playerid,0,0);
					}
					case 2:
     				{
        				SetPVarInt(playerid, "Status", 1);
			         	SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
			         	SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				        AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				        SetPlayerTime(playerid,0,0);
         			}
			        case 3:
		          	{
                        SetPVarInt(playerid, "Status", 1);
			         	SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
			         	SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	SetPlayerTime(playerid,0,0);
		         	}
		         	case 4:
			        {
                     	SetPVarInt(playerid, "Status", 1);
		         		SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
		         		SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
		         		AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
		         		AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
		         		SetPlayerTime(playerid,0,0);
		         	}
		         	case 5:
		         	{
                        SetPVarInt(playerid, "Status", 1);
			         	SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
			         	SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			         	SetPlayerTime(playerid,0,0);
	         		}
			        case 6:
			 		{
					 	DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon3"));
       					DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7"));
  						DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon11"));
        				DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon13")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon14")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon15")); DeletePVar(playerid, "Status");
	         			DestroyObject(GetPVarInt(playerid, "neon16")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon17")); DeletePVar(playerid, "Status");	         			SetPlayerTime(playerid,12,0);
                    }
                }
            }
		}
		case DIALOG_GUN:
		{
		    if(response)
		    {
				switch(listitem)
				{
				    case 0:
				    {
						GPW(playerid,4,ammo);
						SCM(playerid,COLOR_YELLOW,"Have Fun With knife");
					}
				    case 1:
				    {
				        GPW(playerid, 22, ammo);
            			SCM(playerid, COLOR_YELLOW, "Have Fun With 9mm!!");
					}
					case 2:
					{
					    GPW(playerid, 23, ammo);
						SCM(playerid, COLOR_YELLOW, "Have Fun With s9mm!!");
					}
					case 3:
					{
					    GPW(playerid, 24, ammo);
					    SCM(playerid, COLOR_YELLOW, "Have Fun With Desert Eagle!!");
					}
					case 4:
					{
					    GPW(playerid, 25, ammo);
					    SCM(playerid, COLOR_YELLOW, "Have Fun With Shotgun!!");
					}
					case 5:
					{
					    GPW(playerid, 26, ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Sawoff Shotgun!!");
					}
					case 6:
					{
						GPW(playerid, 27, ammo);
						SCM(playerid,COLOR_YELLOW,"Have Fun With Combat ShotGun!!");
					}
					case 7:
					{
					    GPW(playerid, 28,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Uzi!!");
					}
					case 8:
					{
					    GPW(playerid,29,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With MP5!!");
					}
					case 9:
					{
					    GPW(playerid,30,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With AK-47");
					}
					case 10:
					{
					    GPW(playerid,31,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With M4");
					}
					case 11:
					{
					    GPW(playerid,32,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Tec-9");
					}
					case 12:
					{
					    GPW(playerid,33,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Country Rifle");
					}
					case 13:
					{
					    GPW(playerid,34,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Sniper Rifle");
					}
					case 14:
					{
					    GPW(playerid,45,ammo);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Camera");
					}
					case 15:
					{
					    GPW(playerid,46,1);
					    SCM(playerid,COLOR_YELLOW,"Have Fun With Parachute");
					}
				}
			}
		}
		case DIALOG_MUSIC:
		{
		    if(response)
		    {
		        switch(listitem)
		        {
		            case 0:
		            {
		                PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Noi-Anh-Khong-Thuoc-Ve-365DaBand/knJntLmalSzJgnHTZDJyvHLn");
					}
					case 1:
					{
					    PlayAudioStreamForPlayer(playerid,"http://data.chiasenhac.com/downloads/1084/0/1083514-60fff019/128/Forever%20Alone%20Touliver%20Remix_%20-%20JustaTee%20[MP3%20128kbps].mp3");
					}
					case 2
					{
					    PlayAudioStreamForPlayer(playerid,"http://mp3.zing.vn/download/song/Vut-Bay-Young-Generation-Thanh-Bui-Noo-Phuoc-Thinh-Dong-Nhi-Ong-Cao-Thang-Si-Thanh-Thanh-Tam-Tam-Tit-365DaBand-JustaTee-Kimmese-Mr-T/ZmJnTkmNlpdGzZhykFxybmkH");
					}
					case 3:
					{
						StopAudioStreamForPlayer(playerid);
					}
				}
			}
		}
	}
    return 1;
}
__________________
xganyx is offline   Reply With Quote
Old 30/06/2013, 11:06 AM   #5
xganyx
Gangsta
 
xganyx's Avatar
 
Join Date: May 2013
Posts: 675
Reputation: 7
Default Re: Help Please AudioStream

Oh shit sorry guy i'm fixed
on case 2 i'm forget this :
__________________
xganyx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help Me AudioStream!!! xganyx Scripting Help 10 23/06/2013 03:45 AM
AudioStream oliver12 Scripting Help 5 29/08/2012 08:21 AM
AudioStream Chrillzen Scripting Help 11 06/06/2012 04:41 AM
AudioStream Elias_Haddad Scripting Help 0 17/03/2012 12:48 PM


All times are GMT. The time now is 03:18 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.