Streaming for all vehicle pessengers -
Black Axe - 15.01.2012
I Did that CMD :
PHP код:
if(strcmp(cmd, "/Setradio", true) == 0)
{
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid,COLOR_GREY," You are not in a vehicle!");
return 1;
}
ShowPlayerDialog(playerid, 1213, DIALOG_STYLE_LIST, "Car Radio", "{FF0000}My Songs", "Choose", "Exit");
return 1;
}
It's working - but how to make it that only The driver can use it and once he do that all the Vehicle Pessengers hear it ? and that if player enter the vehicle while it's working the music works for him too
- i really need help guys - PLease
Re: Streaming for all vehicle pessengers -
xGoldenx - 15.01.2012
You have to modify the dialog's code, not command's. Show us your car radio dialog
Re: Streaming for all vehicle pessengers -
Black Axe - 17.01.2012
Here :
PHP код:
switch(listitem)
{
case 0:
{
if(playing[playerid] == 1)
{
playing[playerid] = 0;
GameTextForPlayer(playerid, "~w~Music ~r~stopped", 3000, 3);
StopAudioStreamForPlayer(playerid);
}
else
{
SendClientMessage(playerid, color_wa, "- You aren't playing music -");
}
}
case 1:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/cl_01.mp3");
/*
If you navigate to:
- http://83.87.110.147/files/music/
- http://83.87.110.147/files/
or
- http://83.87.110.147/
The webserver will return: "Not Found".
This does NOT mean the .mp3 files aren't available.
The .mp3 files are hosted 24/7 at a professional webserver system.
The reason why there isn't a .com domain is because it is not needed.
That is why it is just the IP address of the webserver.
Any attempt to hack or take down the webserver will be logged.
Also, your IP address will be reported to the France minister of internet crime and your ISP.
*/
}
case 2:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/du_01.mp3");
}
case 3:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/el_01.mp3");
}
case 4:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/hi_01.mp3");
}
case 5:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/ho_01.mp3");
}
case 6:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/ja_01.mp3");
}
case 7:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/me_01.mp3");
}
case 8:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/po_01.mp3");
}
case 9:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/rn_01.mp3");
}
case 10:
{
playing[playerid] = 1;
GameTextForPlayer(playerid, "~w~Music ~g~started", 3000, 3);
PlayAudioStreamForPlayer(playerid, "http://83.87.110.147/files/music/ro_01.mp3");
}
}
}
Re: Streaming for all vehicle pessengers -
Black Axe - 17.01.2012
Guys , I Really need urgent help.. Please
Re: Streaming for all vehicle pessengers -
jamesbond007 - 17.01.2012
for loop thought all players
-> GetPlayerVehicleSeat(i)==1||GetPlayerVehicleSeat(i )==2||GetPlayerVehicleSeat(i)==3||GetPlayerVehicle Seat(i)==4
PlayerSound(i);
understood?
Re: Streaming for all vehicle pessengers -
Black Axe - 18.01.2012
No.. :S - Can you Explain more please ?
Re: Streaming for all vehicle pessengers -
thimo - 18.01.2012
GetPlayerState(playerid, PLAYER_STATE_DRIVER)
That would do it!
Re: Streaming for all vehicle pessengers -
Black Axe - 18.01.2012
Yeah , But the problem that how to make it Stream for all Vehicle Passengers ?
Re: Streaming for all vehicle pessengers -
thimo - 18.01.2012
I think using GetVehicleID and loop true all players. If the vehicle id matches then play it. do not ask how because i dont know
Re: Streaming for all vehicle pessengers -
Black Axe - 18.01.2012
Well , if anyone can tell how ? It would be really Appreciated.. i am really trying to learn pawno and i am done my best , but it isn't easy
(i will rep+)