- Регистрация
- 5 Июл 2024
- Сообщения
- 348
- Автор темы
- #1
Всем ку, помогите пофиксить радио вот код
есть шанс что это может быть из за этой строчки
и если это из за неё мне бы нужно бы заменить это на свою ссылку, но у меня нету /samp/audio_duration.php?audioUrl=%s
Pawn:
stock createZoneAZVoice(zone_type, id, const zone_name[], zone_colors, zone_write = -1, forplayerid = INVALID_PLAYER_ID)
{
new BitStream:bs = BS_New(), zone_uid = (zone_write == -1 ? (Iter_Free(audioZone) + 1) : zone_write);
if(!Iter_Contains(audioZone, zone_uid) && zone_write == -1)
Iter_Add(audioZone, zone_uid - 1);
BS_WriteValue(bs,
PR_UINT8, 10,
PR_UINT16, zone_uid,
PR_UINT16, strlen(zone_name),
PR_STRING, zone_name,
PR_UINT32, zone_colors,
PR_UINT8, zone_type,
PR_UINT16, id,
PR_UINT32, 0);
if(zone_type > 1)
RadioInfo_data[zone_uid][data_ID] = id,
RadioInfo_data[zone_uid][data_Type] = zone_type;
if(forplayerid == INVALID_PLAYER_ID && zone_type == 3)
PR_SendRPCToVehicleStream(bs, id, 252);
else PR_SendRPC(bs, forplayerid, 252);
return BS_Delete(bs), zone_uid;
}
stock playZoneAZVoice(zone_uid, const url[], start_time, forplayerid = INVALID_PLAYER_ID)
{
if(zone_uid < 0)
return false;
new BitStream:bs = BS_New();
BS_WriteValue(bs,
PR_UINT8, 17,
PR_UINT16, zone_uid,
PR_BOOL, true,
PR_UINT16, strlen(url),
PR_STRING, url,
PR_FLOAT, 0.0,
PR_FLOAT, 0.7);
if(start_time)
BS_WriteValue(bs,
PR_BOOL, true,
PR_UINT32, start_time);
f(RadioInfo_data[zone_uid][data_Url], 120, url),
RadioInfo_data[zone_uid][data_Time][0] = start_time;
HTTP(zone_uid, HTTP_GET, (str_f("wh11340.web2.maze-host.ru/samp/audio_duration.php?audioUrl=%s", url)), "", "GetAudioDuration");
if(forplayerid == INVALID_PLAYER_ID && RadioInfo_data[zone_uid][data_Type] == 3)
PR_SendRPCToVehicleStream(bs, RadioInfo_data[zone_uid][data_ID], 252);
else PR_SendRPC(bs, forplayerid, 252);
return BS_Delete(bs);
}
stock destroyZoneAZVoice(zone_uid, bool:destroy = false, forplayerid = INVALID_PLAYER_ID, bool:destroy_server = false)
{
if(zone_uid < 0)
return false;
new BitStream:bs = BS_New();
if(destroy_server)
Iter_Remove(audioZone, zone_uid),
f(RadioInfo_data[zone_uid][data_Url], 120, ""), RadioInfo_data[zone_uid][data_Time][0] = RadioInfo_data[zone_uid][data_Time][1] = 0, RadioInfo_data[zone_uid][data_ID] = INVALID_DATA_ID;
BS_WriteValue(bs,
PR_UINT8, destroy ? 11 : 13,
PR_UINT16, zone_uid);
if(forplayerid == INVALID_PLAYER_ID && RadioInfo_data[zone_uid][data_Type] == 3)
PR_SendRPCToVehicleStream(bs, RadioInfo_data[zone_uid][data_ID], 252);
else PR_SendRPC(bs, forplayerid, 252);
return BS_Delete(bs);
}
Pawn:
HTTP(zone_uid, HTTP_GET, (str_f("wh11340.web2.maze-host.ru/samp/audio_duration.php?audioUrl=%s", url)), "", "GetAudioDuration");