Play audio stream for everyone in the car help
#5

here ya go
pawn Код:
new pVeh = GetPlayerVehicleID(playerid); // store the player's vehicle id into the var pVeh
for(new i = 0; i < MAX_PLAYERS; i ++) // looping through all players
{
    if(!IsPlayerConnected(i) || IsPlayerNPC(i))
        continue;
    // here they are connected and not NPCes
    if(PVeh == GetPlayerVehicleID(i)) // if pVeh (the id of the player's vehicle) equals to i's (connected player) vehicleid
    {
        PlayAudioStreamForPlayer(i, "Your URL here"); // plays it for the connected player.
    }
}
Reply


Messages In This Thread
Play audio stream for everyone in the car help - by Euan Hughes - 03.07.2012, 16:26
Re: Play audio stream for everyone in the car help - by .FuneraL. - 03.07.2012, 16:32
Re: Play audio stream for everyone in the car help - by Euan Hughes - 03.07.2012, 16:33
Re: Play audio stream for everyone in the car help - by iggy1 - 03.07.2012, 16:33
Re: Play audio stream for everyone in the car help - by [KHK]Khalid - 03.07.2012, 16:39

Forum Jump:


Users browsing this thread: 3 Guest(s)