Carleone
Умник
ко всем new
В public OnPlayerCommandText(playerid, cmdtext[])
Автор: Неизвестно!
Думаю заслужил +
P.S Вырезал с своего мода!
PHP:
new StationUrl[MAX_RADIO][] = {
"http://www.181.fm/winamp.pls?station=181-uktop40",
"http://www.181.fm/winamp.pls?station=181-power",
"http://www.181.fm/winamp.pls?station=181-hardrock",
"http://megaradio.radiotelek.ru/megaradio.m3u",
"http://www.zaycev.fm:9001/rnb/ZaycevFM(128)",
"http://webcast.emg.fm:55655/europaplus128.mp3",
"http://radio.maks-fm.ru:8000/maksfm128.m3u",
"http://radio.kazantip-fm.ru:8000/mp396"
};
PHP:
else if(!strcmp(cmd, "/fm", true))
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return MSG_NODRIVER(playerid);
if(WaitChooseRadio[playerid]) return 1;
new vehicleid = GetPlayerVehicleID(playerid);
if(IsBmx(vehicleid) || IsRcCar(vehicleid)) return SendClientMessage(playerid, COLOR_GREEN, "В данном транспортном средстве нет радио");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
f(string, "» Использование: /fm [0-%d]", MAX_RADIO);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
new radio = strval(tmp);
if(radio < 0 || radio > MAX_RADIO)
{
f(string, "Ты ввёл не верную радиостанцию. Используй радиостанцию от 0 до %d", MAX_RADIO);
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
if(VehicleRadio[GetPlayerVehicleID(playerid)] == radio) return SendClientMessage(playerid, COLOR_GREEN, "У тебя уже установлена данная радиостанция");
if(radio == 0) GameTextForPlayer(playerid, StationTitle[8], 3000, 3);
VehicleRadio[vehicleid] = radio;
PlayVehicleRadioForPlayer(playerid, VehicleRadio[vehicleid]);
SetPlayerChatBubble(playerid, "Сменил радиостанцию", COLOR_AQUA, 30.0, 5000);
for(new i=0; i<8; i++)
{
if(VehiclePassenger[vehicleid][i] != INVALID_PLAYER_ID) PlayVehicleRadioForPlayer(VehiclePassenger[vehicleid][i], VehicleRadio[vehicleid]);
}
return 1;
}
Думаю заслужил +
P.S Вырезал с своего мода!
