OtaconEvil

[EXEMPLE] Easy Screen Fade By OTACON

Jan 23rd, 2014
730
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <zcmd>
  3. #include <a_fade> // <---- [INC] Easy Screen Fade By OTACON
  4.  
  5. new Text:FadeTest[9],
  6. ColorRandom[12]={0xA000FFFF,0x00C600FF,0xFFAFFFFF,0xC10000FF,0x009BFFFF,0x00D7FFFF,0x009B00FF,0xC6C5D1FF,0xFFFF00FF,0xCDAD00FF,0xFFFFFFFF,0xB2A8C0FF};
  7.  
  8. public OnFilterScriptInit(){
  9.     AddPlayerClass(145,2089.0872,-1606.0736,13.3682,293.7279,0,0,0,0,0,0); //testing
  10.  
  11.     FadeTest[0] = TextDrawCreate(-30.000000, -4.000000, "_");
  12.     TextDrawBackgroundColor(FadeTest[0], 255);
  13.     TextDrawFont(FadeTest[0], 1);
  14.     TextDrawLetterSize(FadeTest[0], 0.500000, 58.899986);
  15.     TextDrawColor(FadeTest[0], -1);
  16.     TextDrawSetOutline(FadeTest[0], 0);
  17.     TextDrawSetProportional(FadeTest[0], 1);
  18.     TextDrawSetShadow(FadeTest[0], 1);
  19.     TextDrawUseBox(FadeTest[0], 1);
  20.     TextDrawBoxColor(FadeTest[0], 255);
  21.     TextDrawTextSize(FadeTest[0], 730.000000, 100.000000);
  22.     TextDrawSetSelectable(FadeTest[0], 0);
  23.    
  24.     FadeTest[1] = TextDrawCreate(12.000000, 201.000000, "B");
  25.     FadeTest[2] = TextDrawCreate(76.000000, 197.000000, "y");
  26.     FadeTest[3] = TextDrawCreate(207.000000, 202.000000, "O");
  27.     FadeTest[4] = TextDrawCreate(288.000000, 202.000000, "T");
  28.     FadeTest[5] = TextDrawCreate(340.000000, 202.000000, "A");
  29.     FadeTest[6] = TextDrawCreate(412.000000, 202.000000, "C");
  30.     FadeTest[7] = TextDrawCreate(472.000000, 202.000000, "O");
  31.     FadeTest[8] = TextDrawCreate(552.000000, 202.000000, "N");
  32.     for(new index=1; index<9; index++){
  33.         TextDrawBackgroundColor(FadeTest[index], 255);
  34.         TextDrawFont(FadeTest[index], 1);
  35.         TextDrawLetterSize(FadeTest[index], 2.999999, 11.000000);
  36.         TextDrawColor(FadeTest[index], -1);
  37.         TextDrawSetOutline(FadeTest[index], 1);
  38.         TextDrawSetProportional(FadeTest[index], 1);
  39.         TextDrawSetSelectable(FadeTest[index], 0);}
  40.    
  41.     return true;
  42. }
  43.  
  44. COMMAND:test1(playerid, params[]){
  45.     SetEasyScreenFade(0,playerid,FadeTest[0],ColorRandom[random(12)],false,170);
  46.     return true;
  47. }
  48. COMMAND:test2(playerid, params[]){
  49.     KillEasyScreenFade(0,playerid,FadeTest[0]);
  50.     return true;
  51. }
  52.  
  53. COMMAND:test3(playerid, params[]){
  54.     for(new index=1; index<9; index++){
  55.         SetEasyScreenFade(index,playerid,FadeTest[index],ColorRandom[random(12)],true,170);}
  56.     return true;
  57. }
  58. COMMAND:test4(playerid, params[]){
  59.     for(new index=1; index<9; index++){
  60.         KillEasyScreenFade(index,playerid,FadeTest[index]);}
  61.     return true;
  62. }
  63.  
  64. public OnFunctionOfEasyScreenFade(slot,playerid){
  65.  
  66.     SendClientMessage(playerid,-1,"INFO: easy screen fade, done [By OTACON]!.");
  67.     if(slot==0){
  68.         SetEasyScreenFade(0,playerid,FadeTest[0],ColorRandom[random(12)],false,170);
  69.     }
  70.    
  71.     if(slot>=1){
  72.         SetEasyScreenFade(slot,playerid,FadeTest[slot],ColorRandom[random(12)],true,170);
  73.     }
  74.    
  75.     return true;
  76. }
RAW Paste Data