25.11.2011, 23:55
I have radio command, what do I have to do with it so that the music plays for anyone in that vehicle, and when you leave it stops playing for the player who left, but it stays on for everyone else until /radiostop is used.
pawn Код:
if(strcmp(cmd, "/radio", true) == 0)
{
if(gPlayerHasCar[playerid] == 0)
{
SendClientMessage(playerid, 0xAFAFAFAA, " Nie posiadasz auta !");
return 1;
}
else
{
if(IsPlayerInVehicle(playerid, Vehicle090[playerid]))
{
if(PlayerInfo[playerid][RadioA] == 1)
{
AutoRadio[0][playerid] = Audio_PlayStreamed(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1821702",false,false,false);
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "W twoim aucie nie ma zamontowanego radia!");
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, " Nie jestes w swoim pojezdzie !");
}
}
}