10.11.2011, 13:31
Hello, well me and my friend are trying to script a boombox(music player) with RL radio stations.
But we got a problem, we scripted it like this:
-We saved like 8 positions IG and created music player objects in those coordinates(you can hear music from each one within the specific radius)
Well the problem is if we turn on some radio station for some reason it takes the coordinates of each boombox and by that it fucks up the streamed radio link and we cannot hear it, but if for example we will disable the radiuses for each boombox the radio starts to play.
Well We need to make it so that the music playing cmd wont touch every boombox coordinate but it should enable only the 1 that player is standing near.
here is half of the code that might be causing the problem
PS. The "gsf","sbf","tdf" etc.. parts are the created boomboxes:
Example:
-Please someone help and thank you.
But we got a problem, we scripted it like this:
-We saved like 8 positions IG and created music player objects in those coordinates(you can hear music from each one within the specific radius)
Well the problem is if we turn on some radio station for some reason it takes the coordinates of each boombox and by that it fucks up the streamed radio link and we cannot hear it, but if for example we will disable the radiuses for each boombox the radio starts to play.
Well We need to make it so that the music playing cmd wont touch every boombox coordinate but it should enable only the 1 that player is standing near.
here is half of the code that might be causing the problem
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == CHANNEL_DIALOGID) { GetObjectPos(gsf,box[0],box[1],box[2]); GetObjectPos(sbf,box[0],box[1],box[2]); GetObjectPos(tdf,box[0],box[1],box[2]); GetObjectPos(fyb,box[0],box[1],box[2]); GetObjectPos(rhb,box[0],box[1],box[2]); GetObjectPos(ktb,box[0],box[1],box[2]); GetObjectPos(tdb,box[0],box[1],box[2]); GetObjectPos(v,box[0],box[1],box[2]); GetObjectPos(vla,box[0],box[1],box[2]);
Example:
Код:
CreateMusicBox(FUNBOX, 2489.7170,-1648.9633,13.5063 -1, 0.0,0.0,0.0,100);
Код:
stock CreateMusicBox(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance) { new musicbox = CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance); RadioObject[musicbox] = 1; return musicbox; }