LukasB 0 Odesláno: 31. Prosinec, 2014 Share Odesláno: 31. Prosinec, 2014 Čaute, chcem sa opýtať mám v spravený cez DIALOG_STYLE_LIST radio . A problém je v tom že neviem ako mám spraviť poslucháčov. Nevedeli by ste mi s tím poradiť ? Toto mám v OnDialogResponse: switch(listitem) { case 0:{ StopAudioStreamForPlayer(playerid); } case 1:{ ShowPlayerDialog(playerid,DIALOG_URLRADIA,DIALOG_STYLE_INPUT,"Zadaj url","Sem zadajte url rádia ktoré chcte spusti.","OK","Zrusi"); } case 2:{ Posluchaci[0] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://85.248.7.162:8000/96.mp3"); } case 3:{ Posluchaci[1] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://stream.funradio.sk:8000/fun128.mp3"); } case 4:{ Posluchaci[2] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://ice2.europa2.sk/fm-europa2sk-128"); } case 5:{ Posluchaci[3] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://live1.antenahitradio.sk:8000/antenahit"); } case 6:{ Posluchaci[4] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3"); } case 7:{ Posluchaci[5] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://icecast4.play.cz/frekvence1-128.mp3"); } case 8:{ Posluchaci[6] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://ice.abradio.cz:8000/fajn128.mp3"); } case 9:{ Posluchaci[7] ++; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://ice.abradio.cz/hitpoprock128.mp3"); } } Chcel by som to tak že ak hráč počúva rádio a dá vypnúť rádio (case 0) tak to zistý na akom bol a odčíta Poslucháčov. A tak by to fungovalo aj u ostatných že by som prepol z case 2 na case 3 a odčítalo by poslucháčov z case 2 a pridalo do case 3. Pls help . Diki Link to comment Share on other sites More sharing options...
0 mxco 55 Odesláno: 31. Prosinec, 2014 Share Odesláno: 31. Prosinec, 2014 tak když už jsi přišel na to že se dá použít proměnná s polem tak proč ne i na to, jaké "id" rádia má puštěné a stačil bych klidně SetPVarInt 1 Link to comment Share on other sites More sharing options...
0 Deejva 36 Odesláno: 31. Prosinec, 2014 Share Odesláno: 31. Prosinec, 2014 Jednoduchý způsob je takový: Nahoře RadioHrace[MAX_PLAYERS]; U nastavování radio nastavíš hráčovi rádio.. case 6:{ Posluchaci[4] ++; Posluchaci[RadioHrace[playerid]]--; RadioHrace[playerid]=4; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http://icecast3.play.cz/evropa2-128.mp3"); } 1 Link to comment Share on other sites More sharing options...
0 LukasB 0 Odesláno: 1. Leden, 2015 Author Share Odesláno: 1. Leden, 2015 Takže takto ?: case 2:{ Posluchaci[0] ++; Posluchaci[RadioHrace[playerid]]--; RadioHrace[playerid]=0; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http:.."); } case 3:{ Posluchaci[1] ++; Posluchaci[RadioHrace[playerid]]--; RadioHrace[playerid]=1; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http:.."); } case 4:{ Posluchaci[2] ++; Posluchaci[RadioHrace[playerid]]--; RadioHrace[playerid]=2; StopAudioStreamForPlayer(playerid); PlayAudioStreamForPlayer(playerid,"http:.."); } . . . Link to comment Share on other sites More sharing options...
0 LukasB 0 Odesláno: 2. Leden, 2015 Author Share Odesláno: 2. Leden, 2015 aby ste zbitočne neodpisovali tak - Už mi to ide txh Link to comment Share on other sites More sharing options...
Dotaz
LukasB 0
Čaute, chcem sa opýtať mám v spravený cez DIALOG_STYLE_LIST radio . A problém je v tom že neviem ako mám spraviť poslucháčov.
Nevedeli by ste mi s tím poradiť ?
Toto mám v OnDialogResponse:
Chcel by som to tak že ak hráč počúva rádio a dá vypnúť rádio (case 0) tak to zistý na akom bol a odčíta Poslucháčov.
A tak by to fungovalo aj u ostatných že by som prepol z case 2 na case 3 a odčítalo by poslucháčov z case 2 a pridalo do case 3. Pls help . Diki
Link to comment
Share on other sites
4 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now