Advertisement
OtaconEvil

[INC] Easy LetterBox 'Buzones de Cartas' By OTACON

Sep 28th, 2013
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.86 KB | None | 0 0
  1. /*
  2.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  3.     *
  4.     * Estè Simple INCLUDE esta hecho especialmente para www.forum.sa-mp.com
  5.     * NO Publicar estè INCLUDE 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 INCLUDE sin Mi Permiso.
  17. */
  18.  
  19. /*
  20.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  21.     *
  22.     * This simple INCLUDE is made especially for www.forum.sa-mp.com
  23.     * DO NOT Post the INCLUDE in Other SAMP forums and impersonating the creator of the CODE.
  24.     *
  25.     * Code Created By OTACON
  26.     *
  27.     * CREDITS:
  28.     *     OTACON: Idea Making and code creation.
  29.     *     YOUR: Modification freely respecting the above ;).
  30.     *
  31.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  32.     *
  33.     *                    FULLY spaces Theft Credit or
  34.     *             Publication of this INCLUDE without my permission.
  35. */
  36.  
  37. // ###### --- FUNCTION --- ############ --- FUNCTION --- ######
  38. /*
  39.     native SetLetterBox(slots,bool:type=false);
  40.     native CreateLetterBox(slots,type,Float:x,Float:y,Float:z,Float:a);
  41.     native DestroyLetterBox(slots);
  42. */
  43. #define MAX_SLOTS (200)
  44. #define LetterBox_OPEN (3408)
  45. #define LetterBox_CLOSE (3407)
  46. new LetterBox[MAX_SLOTS];
  47.  
  48. #define DestroyLetterBox(%0) DestroyObject(LetterBox[%0])
  49. stock CreateLetterBox(slots,type,Float:x,Float:y,Float:z,Float:a) {
  50. LetterBox[slots]=CreateObject(type,x,y,z,0.000,0.000,a); }
  51.  
  52. stock SetLetterBox(slots,bool:type=false) {
  53.     new Float:PosLetterBox[6];
  54.     GetObjectPos(LetterBox[slots],PosLetterBox[0],PosLetterBox[1],PosLetterBox[2]);
  55.     GetObjectRot(LetterBox[slots],PosLetterBox[3],PosLetterBox[4],PosLetterBox[5]);
  56.     DestroyLetterBox(slots);
  57.     if(!type) { CreateLetterBox(slots,LetterBox_CLOSE,PosLetterBox[0], PosLetterBox[1], PosLetterBox[2], PosLetterBox[5]); }
  58.     else { CreateLetterBox(slots,LetterBox_OPEN,PosLetterBox[0], PosLetterBox[1], PosLetterBox[2], PosLetterBox[5]); }
  59. }
  60. // ###### --- FUNCTION --- ############ --- FUNCTION --- ######
  61.  
  62. /*
  63.     #include <a_samp>
  64.     #include <zcmd>
  65.     #include <LetterBox>
  66.  
  67.     #define FUNCTION:%0(%1) forward%0(%1); public%0(%1)
  68.     #define MAX_BUZONES (5)
  69.  
  70.     FUNCTION: OnFilterScriptInit() {
  71.         print("\n**************************************");
  72.         print("       Easy LetterBox 'mailbox'         ");
  73.         print("           Date: 25/09/2013             ");
  74.         print("            Author: OTACON              ");
  75.         print("   --* Downloaded with Success!!. *--   ");
  76.         print("***************************************\n");
  77.         SendRconCommand("hostname Easy LetterBox 'mailbox' ");
  78.         SendRconCommand("gamemodetext By OTACON");
  79.  
  80.         // ###### TESTING ######
  81.         AddPlayerClass(115,244.3621,1821.4523,17.6406,262.0000,0,0,0,0,0,0); //
  82.         // ###### TESTING ######
  83.         CreateLetterBox(MAX_BUZONES+0,LetterBox_CLOSE,245.0680,1819.7510,17.6406-1,84.9565);
  84.         CreateLetterBox(MAX_BUZONES+1,LetterBox_OPEN,240.5916,1820.3887,17.6406-1,84.9565);
  85.         CreateLetterBox(MAX_BUZONES+2,LetterBox_CLOSE,236.0589,1820.7885,17.6481-1,84.9565);
  86.         CreateLetterBox(MAX_BUZONES+3,LetterBox_OPEN,232.0962,1821.1383,17.6481-1,84.9565);
  87.         CreateLetterBox(MAX_BUZONES+4,LetterBox_CLOSE,228.3653,1821.4677,17.6406-1,84.9565);
  88.         return true;
  89.     }
  90.     FUNCTION: OnFilterScriptExit() {
  91.         print("\n**************************************");
  92.         print("       Easy LetterBox 'mailbox'         ");
  93.         print("           Date: 25/09/2013             ");
  94.         print("            Author: OTACON              ");
  95.         print("     --* Loaded with Success!!. *--     ");
  96.         print("***************************************\n");
  97.         SendRconCommand("hostname Easy LetterBox 'mailbox' ");
  98.         SendRconCommand("gamemodetext By OTACON");
  99.  
  100.         DestroyLetterBox(MAX_BUZONES+0);
  101.         DestroyLetterBox(MAX_BUZONES+1);
  102.         DestroyLetterBox(MAX_BUZONES+2);
  103.         DestroyLetterBox(MAX_BUZONES+3);
  104.         DestroyLetterBox(MAX_BUZONES+4);
  105.         return true;
  106.     }
  107.     COMMAND:open(playerid, params[]) {
  108.         SetLetterBox(MAX_BUZONES+0,true);
  109.         SetLetterBox(MAX_BUZONES+1,false);
  110.         SetLetterBox(MAX_BUZONES+2,true);
  111.         SetLetterBox(MAX_BUZONES+3,false);
  112.         SetLetterBox(MAX_BUZONES+4,true);
  113.         return true;
  114.     }
  115.     COMMAND:close(playerid, params[]) {
  116.         SetLetterBox(MAX_BUZONES+0,false);
  117.         SetLetterBox(MAX_BUZONES+1,true);
  118.         SetLetterBox(MAX_BUZONES+2,false);
  119.         SetLetterBox(MAX_BUZONES+3,true);
  120.         SetLetterBox(MAX_BUZONES+4,false);
  121.         return true;
  122.     }
  123. */
  124.  
  125. /*
  126.     * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
  127.     *
  128.     * Estè Simple INCLUDE esta hecho especialmente para www.forum.sa-mp.com
  129.     * NO Publicar estè INCLUDE en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
  130.     *
  131.     * Codigo Creado Por OTACON
  132.     *
  133.     * CREDITOS:
  134.     *     OTACON: Realizacion y Idea de creacion del code.
  135.     *     TÙ: Modificacion libremente respetando lo mencionado ;).
  136.     *
  137.     *    NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
  138.     *
  139.     *            Prohibido TOTALMENTE el Robo de Créditos o la
  140.     *              Publicación de este INCLUDE sin Mi Permiso.
  141. */
  142.  
  143. /*
  144.     * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
  145.     *
  146.     * This simple INCLUDE is made especially for www.forum.sa-mp.com
  147.     * DO NOT Post the INCLUDE in Other SAMP forums and impersonating the creator of the CODE.
  148.     *
  149.     * Code Created By OTACON
  150.     *
  151.     * CREDITS:
  152.     *     OTACON: Idea Making and code creation.
  153.     *     YOUR: Modification freely respecting the above ;).
  154.     *
  155.     *    NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
  156.     *
  157.     *                    FULLY spaces Theft Credit or
  158.     *             Publication of this INCLUDE without my permission.
  159. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement