16.02.2016, 12:44
When i type /radio 1, it plays two streams 1 and 2.
When i type /radio 1 again, it plays 3 and 4 stream.
When i spam that command, there is more and more streams to play at one time
When i type /radio 1 again, it plays 3 and 4 stream.
When i spam that command, there is more and more streams to play at one time
Код:
YCMD:radio(playerid, params[], help) //Komanda za radio { #pragma unused help new x_nr[128]; new hID; hID = GetPlayerVehicleID(playerid); if(IsPlayerConnected(playerid) && gPlayerLogged[playerid] == 0) return LOGINGRESKA if(PlayerInfo[playerid][pSpawn] == 5) return AREAGRESKA //if(IsBike(hID)) return BIKEGRESKARADIO if(IsPlayerInVehicle(playerid, hID)) { if(sscanf(params, "{u}", x_nr)) return SCM(playerid, C_KORISTENJE, "[UPUTA]: /radio [0-20]"); if(strcmp(x_nr, "0", true) == 0) { StopAudioStreamForPlayer(playerid); PlayerRadio[playerid]=0; new stringgh[512]; format(stringgh, sizeof(stringgh), "RADIO: ~w~%d", PlayerRadio[playerid]); PlayerTextDrawSetString(playerid, Brzinomjer[4][playerid], stringgh); } if(strcmp(x_nr, "1", true) == 0) { PlayAudioStreamForPlayer(playerid, "http://80.237.157.49:8070/"); PlayerRadio[playerid]=1; new stringgh[512]; format(stringgh, sizeof(stringgh), "RADIO: ~w~%d", PlayerRadio[playerid]); PlayerTextDrawSetString(playerid, Brzinomjer[4][playerid], stringgh); } if(strcmp(x_nr, "2", true) == 0) { PlayAudioStreamForPlayer(playerid, "http://80.237.157.49:8070/"); PlayerRadio[playerid] = 1; new string[120]; format(string, sizeof(string), "RADIO: ~w~%d", PlayerRadio[playerid]); PlayerTextDrawSetString(playerid, Brzinomjer[4][playerid], string); } } return 1; }