03.09.2018, 01:07
Sorry for my bad english, i have made boombox system but i have one problem, when te player drive the car and listen music in the car, stream from boombox on the street appears in hes car, and that makes the problem.
Can you guys help me to solve that problem, in this checks make if player is in car to not play music for him?
And this if you want:
Can you guys help me to solve that problem, in this checks make if player is in car to not play music for him?
Код:
public OnPlayerEnterDynamicArea(playerid, areaid) { foreach(new i : Player) { if(GetPVarType(i, "BBArea")) { if(areaid == GetPVarInt(i, "BBArea")) { new station[256]; GetPVarString(i, "BBStation", station, sizeof(station)); if(!isnull(station)) { PlayStream(playerid, station, GetPVarFloat(i, "BBX"), GetPVarFloat(i, "BBY"), GetPVarFloat(i, "BBZ"), 30.0, 1); } return 1; } } } return 1; }
Код:
stock PlayStream(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) { if(GetPVarType(playerid, "pAudioStream")) StopAudioStreamForPlayer(playerid); else SetPVarInt(playerid, "pAudioStream", 1); PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos); }