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.