Advertisement
OtaconEvil

[FS] SAMP-TUBE | SPRITE/TXD/TEXTDRAW | By OTACON

Mar 2nd, 2017
1,082
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.41 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple FILTERSCRIPT esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè FILTERSCRIPT en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  6.     *
  7.     * Codigo Creado Por OTACON
  8.     *
  9.     * CREDITOS:
  10.     *     OTACON: Realizacion y Idea de creacion del code.
  11.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  12.     *
  13.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  14.     *
  15.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  16.     *              Publicación de este FILTERSCRIPT sin Mi Permiso.
  17. */
  18. /*
  19.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  20.     *
  21.     * This simple FILTERSCRIPT is made especially for www.forum.sa-mp.com
  22.     * DO NOT Post the FILTERSCRIPT in Other SAMP forums and impersonating the creator of the CODE.
  23.     *
  24.     * Code Created By OTACON
  25.     *
  26.     * CREDITS:
  27.     *     OTACON: Idea Making and code creation.
  28.     *     YOUR: Modification freely respecting the above ;).
  29.     *
  30.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  31.     *
  32.     *                    FULLY spaces Theft Credit or
  33.     *             Publication of this FILTERSCRIPT without my permission.
  34. */
  35.  
  36.  
  37.  
  38. #include <a_samp>
  39. #include <zcmd>
  40.  
  41. new
  42.     video_kill,
  43.     Text:video,
  44.     Text:screen
  45. ;
  46. new pVideitosID;
  47. enum iVideos
  48. {
  49.     pMAX_FRAME,
  50.     Float:pFPS_VIDEO,
  51.     pNAME_TXD[144],
  52.     pURL_AUDIO[160],
  53.     pFRAMES,
  54. }
  55. #define MAX_VIDEOS (1)
  56. new pVideos[MAX_VIDEOS][iVideos]=
  57. {
  58.     { /*FRAMES()*/(270), /*100/FPS*/33.366699, /*.TXD*/"movie", /*AUDIO*/"http://" }
  59. };
  60.  
  61. public OnFilterScriptInit(){
  62.     video = TextDrawCreate(22.399999, 23.146665, "LD_SPAC:white");
  63.     TextDrawLetterSize(video, 0.000000, 0.000000);
  64.     TextDrawTextSize(video, 589.599975, 405.440002);
  65.     TextDrawAlignment(video, 1);
  66.     TextDrawColor(video, -1);
  67.     TextDrawSetShadow(video, 0);
  68.     TextDrawSetOutline(video, 0);
  69.     TextDrawFont(video, 4);
  70.  
  71.     screen = TextDrawCreate(2.000000, 1.500000, "usebox");
  72.     TextDrawLetterSize(screen, 0.000000, 49.378147);
  73.     TextDrawTextSize(screen, 637.199951, 0.000000);
  74.     TextDrawAlignment(screen, 1);
  75.     TextDrawColor(screen, 0);
  76.     TextDrawUseBox(screen, true);
  77.     TextDrawBoxColor(screen, 102);
  78.     TextDrawSetShadow(screen, 0);
  79.     TextDrawSetOutline(screen, 0);
  80.     TextDrawFont(screen, 0);
  81.     return true;
  82. }
  83.  
  84. COMMAND:samptube(playerid, params[]){
  85.     pVideitosID=0;
  86.     pVideos[pVideitosID][pFRAMES]=0;
  87.     TextDrawShowForPlayer(playerid,video);
  88.     TextDrawShowForPlayer(playerid,screen);
  89.     StopAudioStreamForPlayer(playerid);
  90.     PlayAudioStreamForPlayer(playerid, pVideos[pVideitosID][pURL_AUDIO]);
  91.     KillTimer(video_kill);
  92.     video_kill = SetTimerEx("video_time",floatround(pVideos[pVideitosID][pFPS_VIDEO]),false,"i",playerid);
  93.     return true;
  94. }
  95.  
  96. forward video_time(playerid);
  97. public video_time(playerid){
  98.     new s[50];
  99.     if(pVideos[pVideitosID][pFRAMES] <= pVideos[pVideitosID][pMAX_FRAME]){
  100.         format(s, sizeof(s), "%s:Imagen_%d", pVideos[pVideitosID][pNAME_TXD], pVideos[pVideitosID][pFRAMES]);
  101.         pVideos[pVideitosID][pFRAMES]++;
  102.         TextDrawSetString(video, s);
  103.         TextDrawShowForPlayer(playerid,video);
  104.         KillTimer(video_kill);
  105.         video_kill = SetTimerEx("video_time",floatround(pVideos[pVideitosID][pFPS_VIDEO]),false,"i",playerid);
  106.     }else{
  107.         pVideos[pVideitosID][pFRAMES]=0;
  108.         TextDrawHideForPlayer(playerid,video);
  109.         TextDrawHideForPlayer(playerid,screen);
  110.         StopAudioStreamForPlayer(playerid);
  111.         KillTimer(video_kill);
  112.     }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement