19.12.2011, 14:45
(
Last edited by Atrox95; 19/12/2011 at 05:26 PM.
)
SA:MP Multi Stream by Atrox
With this include you can hear two (streamed) sounds "at once".
Example: While you are listening to a radio stream an alarm appears. Your radio stream will be stopped and you hear the alarm.
Using this include the radio stream will be restarted if the alarm is done.
Changelog 1.2:
- fixed StopAudioStreamForPlayerEx
- PlayAudioStreamForPlayerEx will be triggered after the duration time to reset the data
v.1.2
Download Pastebin: http://pastebin.com/Nt4mxxGb
Bugs:
-nothing (Please report)
How to use:
New functions:
New parameter: duration in milliseconds. (-1 for an unlimited stream, e.g. a radio)
MfG
Atrox
With this include you can hear two (streamed) sounds "at once".
Example: While you are listening to a radio stream an alarm appears. Your radio stream will be stopped and you hear the alarm.
Using this include the radio stream will be restarted if the alarm is done.
Changelog 1.2:
- fixed StopAudioStreamForPlayerEx
- PlayAudioStreamForPlayerEx will be triggered after the duration time to reset the data
v.1.2
Download Pastebin: http://pastebin.com/Nt4mxxGb
Bugs:
-nothing (Please report)
How to use:
Code:
#include <audiostream> public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/radio",true) == 0) { PlayAudioStreamForPlayerEx(playerid, "http://80.237.158.76:80", -1); return 1; } if(strcmp(cmdtext, "/sound",true) == 0) { PlayAudioStreamForPlayerEx(playerid, "http://www.cms.livjm.ac.uk/library/Alice/Alice/Required/sounds/chicken.mp3", 3000); return 1; } return 0; }
New functions:
Code:
PlayAudioStreamForPlayerEx(playerid, url[], duration, Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) StopAudioStreamForPlayerEx(playerid)
MfG
Atrox