Audio Stream Looping and Start
#5

Quote:
Originally Posted by XtremeR
Посмотреть сообщение
Its Easy

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
    new Float:health;
    new veh;
    veh = GetPlayerVehicleID(playerid);
    GetVehicleHealth(veh, health);
    if(health >250) return PlayAudioStreamForPlayer(playerid, "link here", X, Y, Z, Distance, 1);
    return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{

StopAudioStreamForPlayer(playerid); // Stop the audio stream
    return 1;
}
Alright this is great but what if i want it to play for only a certain vehicle and i don't want it to play when a player enters the vehicle i want it to play eg when the health gets low when it's shot by a missile or a gun and when it gets to that health point then it should play like that is that possible to script? Also to loop it the sound too.
Reply


Messages In This Thread
Audio Stream Looping and Start - by GoldenM4 - 24.09.2012, 23:34
Re: Audio Stream Looping and Start - by XtremeR - 25.09.2012, 05:18
Re: Audio Stream Looping and Start - by YourLord - 25.09.2012, 05:23
Re: Audio Stream Looping and Start - by XtremeR - 25.09.2012, 05:27
Re: Audio Stream Looping and Start - by GoldenM4 - 26.09.2012, 02:39
Re: Audio Stream Looping and Start - by Lilcuete - 26.09.2012, 03:04

Forum Jump:


Users browsing this thread: 7 Guest(s)