03.07.2012, 16:39
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.
}
}