25.05.2017, 03:38
i have script to switchnewsound in the car
but how to stop when out of car any idea
PHP код:
forward SwitchNewSound();
public SwitchNewSound()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInAnyVehicle(i))
{
StopAudioStreamForPlayer(i);
PlayAudioStreamForPlayer(i, RandomSongs[random(sizeof(RandomSongs))]);
URLNumber++;
if(URLNumber == sizeof(RandomSongs)) URLNumber = 0;
}
}
return 1;
}