PlayAudioStreamForPlayer on entering a car
#1

How would I make it so when you enter a SFPD cop car I can play audio with PlayAudioStreamForPlayer and make it stop when they leave the cop car
Reply
#2

Under OnPlayerState add
pawn Код:
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(modelid == /*SFPD Vehicle ID*/)
{
       PlayAudioStreamForPlayer(playerid,"link");
}
Under onplayerexitvehicle
pawn Код:
new modelid = GetVehicleModel(GetPlayerVehicleID(playerid));
if(modelid == /*SFPD Vehicle ID*/)
{
       StopAudioStreamForPlayer(playerid);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)