21.01.2013, 14:42
Quote:
i know you can't create this but i like
pawn Код:
|
pawn Код:
native CreateVideoStream(url,x,y);//creates a video stream which can be shown for players
native VideoStreamSize(streamid,x,y);//change a size of video window/box
native VideoStreamShowForPlayer(playerid,streamid);//Shows a video box for a player
native VideoStreamHideForPlayer(playerid,streamid);//you know what it is
native VideoStreamStartForPlayer(playerid,streamid,starttime=0);//Start video for player from a current second
native VideoStreamStopForPlayer(playerid,streamid);//Stops a video
native VideoStreamBoxColor(streamid,color);//change a color of a video box
//callbacks
forward OnVideoStreamStarted(streamid,playerid); Called when used VideoStreamStartForPlayer
forward OnVideoStreamStopped(streamid,playerid);//called when used VideoStreamStopForPlayer or wehn the video ends
pawn Код:
new Video:gangnam;
public OnGameModeInit()
{
gangnam=CreateVideoStream("examplesite.com/gangnam.avi",50,50);
VideoStreamSize(gangnam,500,500);
VideoStreamBoxColor(gangnam,0xFFFF00);
return 1;
}
CMD:gangnam(playerid,params[])
{
VideoStreamShowForPlayer(playerid,gangnam);
VideoStreamStartForPlayer(playerid,gangnam);
return 1;
}
public OnVideoStreamStopped(streamid,playerid)
{
if(streamid == gangnam) return VideoStreamHideForPlayer(playerid,streamid);
return 1;
}