Advertisement
Guest User

Guide INC

a guest
Dec 27th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.73 KB | None | 0 0
  1. /*
  2.     + MY OLD PROJECTS +
  3.     -------------------
  4.           _________                _________             __________
  5.         /   _______|             /   _______|          /  _________|
  6.        |  /                     |  /                  |  /
  7.        |  |  ______             |  |  ______          |  |
  8.        |  | |___   |            |  | |___   |         |  |
  9.        |  |     |  |            |  |     |  |         |  |
  10.        |  |____/   |            |  |____/   |         |  \_________
  11.        \__________/  eneration  \__________/  aming   \____________| reation
  12.  
  13.          _________
  14.         |    __   |
  15.         |   |  |  |
  16.         |   |__|  |                                        ____________   _           _
  17.         |   ______|              _                        |  __________| |_|         | |
  18.         |  |__________     _____| |       _       _       | |                        | |    ______
  19.         |    _______  |   |  ___  |      | |     | |      | |_______      _     _____| |   |   _  |
  20.         |   |       | |   | |   | |      | |     | |      |_______  |    | |   |  ___  |   |  |_| |
  21.         |   |       | |   | |   | |  _   | |     | |              | |    | |   | |   | |   |  ____|
  22.         |   |_______| |   | |___| |_| |  | |_____| |       _______| |    | |   | |___| |   | |________
  23.         |_____________|   |___________|  |_______  |      |_________|    |_|   |_______|   |__________|
  24.                                                  | |                                                    Creations
  25.                                           _      | |
  26.                                          | |_____| |                                                    
  27.                                          |_________|
  28.     + MY CURRENT PROJECT +
  29.     ----------------------
  30.             ________________
  31.             \              /
  32.         ___  \            /  ___     _________                 _____________
  33.         \  \  \          /  /  /    |   ___   |               |   _______   |
  34.          \  \  \        /  /  /     |  |   |  |               |  |       |  |
  35.           \  \  \      /  /  /      |  |   |  |               |  |       |__|
  36.            \  \  \    /  /  /       |  |___|  |               |  |
  37.             \  \  \  /  /  /        |   _    _|               |  |
  38.              \  \  \/  /  /         |  | \  \                 |  |        __
  39.               \  \    /  /          |  |  \  \                |  |       |  |
  40.                \  \__/  /           |  |   \  \____           |  |_______|  |
  41.                 \______/ ersus      |__|    \______| oleplay  |_____________| reations
  42.  
  43.  
  44.     ------------------------------
  45.     By:    Adnan Pasic (Denim/Pasa)
  46.     Version:            1.0 - Beta
  47.     Relase date:        27.12.2014
  48.     YT video: http://goo.gl/BcWx2u
  49.     IMGS:     http://goo.gl/RLWIAv
  50.    
  51.     + Contact +
  52.    
  53.     FB:       http://goo.gl/QPAOyP
  54.     Skype:            adnanpasic.1
  55.     ------------------------------
  56.  
  57.     Calbacks:
  58.         + ShowGuide(playerid, GuideID, Header[], LeftBlock[], Text1[], Text2[], Text3[])
  59.  
  60.     Note:
  61.         ++ You need to create a stock function [stock OnGuideResponse(playerid, guideid, response)] in your GM/FS where you use
  62.            the include, otherwise you will get an error (error 017: undefined symbol "OnGuideResponse")
  63.  
  64.         + When you use "ShowGuide" for the first time the variable "_GuideSite[playerid]" is set to 0 (for the sites)
  65. */
  66.  
  67. new PlayerText:GuideTDs[MAX_PLAYERS][10],
  68.     _GuideToggled[MAX_PLAYERS] = -1,
  69.     _GuideSite[MAX_PLAYERS] = 0;
  70.  
  71.  
  72. public OnPlayerConnect(playerid) {
  73.     _GuideToggled[playerid] = -1;
  74.     return 1;
  75. }
  76.  
  77. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
  78.     if(newkeys == KEY_YES) OnGuideResponse(playerid, _GuideToggled[playerid], true);
  79.     else if(newkeys == KEY_NO) OnGuideResponse(playerid, _GuideToggled[playerid], false);
  80.     return 1;
  81. }
  82.  
  83. stock ShowGuide(playerid, GuideID, naslov[], dodatak[], sastav[], sastav2[], sastav3[])
  84. {
  85.     ToggleGuide(playerid, true);
  86.     _GuideToggled[playerid] = GuideID;
  87.  
  88.     PlayerTextDrawSetString(playerid, GuideTDs[playerid][4],naslov);
  89.     PlayerTextDrawSetString(playerid, GuideTDs[playerid][5],dodatak);
  90.     PlayerTextDrawSetString(playerid, GuideTDs[playerid][6],sastav);
  91.     PlayerTextDrawSetString(playerid, GuideTDs[playerid][8],sastav2);
  92.     PlayerTextDrawSetString(playerid, GuideTDs[playerid][9],sastav3);
  93.     return 1;
  94. }
  95.  
  96. stock ToggleGuide(playerid, bool:toggle)
  97. {
  98.     if(toggle == true && _GuideToggled[playerid] == -1) {
  99.         GuideTDs[playerid][0] = CreatePlayerTextDraw(playerid, 1.000000, 120.000000, "_");
  100.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][0], 255);
  101.         PlayerTextDrawFont(playerid, GuideTDs[playerid][0], 1);
  102.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][0], 0.500000, 22.500005);
  103.         PlayerTextDrawColor(playerid, GuideTDs[playerid][0], -1);
  104.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][0], 0);
  105.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][0], 1);
  106.         PlayerTextDrawSetShadow(playerid, GuideTDs[playerid][0], 1);
  107.         PlayerTextDrawUseBox(playerid, GuideTDs[playerid][0], 1);
  108.         PlayerTextDrawBoxColor(playerid, GuideTDs[playerid][0], 336860250);
  109.         PlayerTextDrawTextSize(playerid, GuideTDs[playerid][0], 649.000000, 23.000000);
  110.  
  111.         GuideTDs[playerid][1] = CreatePlayerTextDraw(playerid, 8.000000, 125.000000, "~g~Shared guide");
  112.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][1], 255);
  113.         PlayerTextDrawFont(playerid, GuideTDs[playerid][1], 1);
  114.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][1], 0.500000, 1.000000);
  115.         PlayerTextDrawColor(playerid, GuideTDs[playerid][1], -1);
  116.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][1], 1);
  117.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][1], 1);
  118.  
  119.         GuideTDs[playerid][2] = CreatePlayerTextDraw(playerid, 129.000000, 120.000000, "_");
  120.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][2], 255);
  121.         PlayerTextDrawFont(playerid, GuideTDs[playerid][2], 1);
  122.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][2], 0.000000, 22.500000);
  123.         PlayerTextDrawColor(playerid, GuideTDs[playerid][2], -1);
  124.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][2], 0);
  125.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][2], 1);
  126.         PlayerTextDrawSetShadow(playerid, GuideTDs[playerid][2], 1);
  127.         PlayerTextDrawUseBox(playerid, GuideTDs[playerid][2], 1);
  128.         PlayerTextDrawBoxColor(playerid, GuideTDs[playerid][2], -1);
  129.         PlayerTextDrawTextSize(playerid, GuideTDs[playerid][2], 127.000000, 12.000000);
  130.  
  131.         GuideTDs[playerid][3] = CreatePlayerTextDraw(playerid, 1.000000, 141.000000, "_");
  132.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][3], 255);
  133.         PlayerTextDrawFont(playerid, GuideTDs[playerid][3], 1);
  134.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][3], 80.000000, -0.250000);
  135.         PlayerTextDrawColor(playerid, GuideTDs[playerid][3], -1);
  136.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][3], 0);
  137.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][3], 1);
  138.         PlayerTextDrawSetShadow(playerid, GuideTDs[playerid][3], 0);
  139.         PlayerTextDrawUseBox(playerid, GuideTDs[playerid][3], 1);
  140.         PlayerTextDrawBoxColor(playerid, GuideTDs[playerid][3], -1);
  141.         PlayerTextDrawTextSize(playerid, GuideTDs[playerid][3], 645.000000, 0.000000);
  142.  
  143.         GuideTDs[playerid][4] = CreatePlayerTextDraw(playerid, 137.000000, 125.000000, "Naslov");
  144.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][4], 255);
  145.         PlayerTextDrawFont(playerid, GuideTDs[playerid][4], 1);
  146.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][4], 0.500000, 1.000000);
  147.         PlayerTextDrawColor(playerid, GuideTDs[playerid][4], -1);
  148.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][4], 1);
  149.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][4], 1);
  150.  
  151.         GuideTDs[playerid][5] = CreatePlayerTextDraw(playerid, 9.000000, 147.000000, "~b~Side bar");
  152.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][5], 255);
  153.         PlayerTextDrawFont(playerid, GuideTDs[playerid][5], 1);
  154.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][5], 0.320000, 0.899999);
  155.         PlayerTextDrawColor(playerid, GuideTDs[playerid][5], -1);
  156.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][5], 1);
  157.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][5], 1);
  158.  
  159.         GuideTDs[playerid][6] = CreatePlayerTextDraw(playerid, 138.000000, 147.000000, "Text");
  160.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][6], 255);
  161.         PlayerTextDrawFont(playerid, GuideTDs[playerid][6], 1);
  162.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][6], 0.228000, 0.899999);
  163.         PlayerTextDrawColor(playerid, GuideTDs[playerid][6], -1);
  164.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][6], 1);
  165.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][6], 1);
  166.  
  167.         GuideTDs[playerid][8] = CreatePlayerTextDraw(playerid, 138.000000, 204.000000, "Text2");
  168.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][8], 255);
  169.         PlayerTextDrawFont(playerid, GuideTDs[playerid][8], 1);
  170.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][8], 0.228000, 0.899999);
  171.         PlayerTextDrawColor(playerid, GuideTDs[playerid][8], -1);
  172.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][8], 1);
  173.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][8], 1);
  174.  
  175.         GuideTDs[playerid][9] = CreatePlayerTextDraw(playerid, 138.000000, 261.000000, "Text3");
  176.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][9], 255);
  177.         PlayerTextDrawFont(playerid, GuideTDs[playerid][9], 1);
  178.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][9], 0.228000, 0.899999);
  179.         PlayerTextDrawColor(playerid, GuideTDs[playerid][9], -1);
  180.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][9], 1);
  181.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][9], 1);
  182.  
  183.         GuideTDs[playerid][7] = CreatePlayerTextDraw(playerid, 7.000000, 303.000000, "~w~Press~r~ N~w~ to~n~close the guide!");
  184.         PlayerTextDrawBackgroundColor(playerid, GuideTDs[playerid][7], 255);
  185.         PlayerTextDrawFont(playerid, GuideTDs[playerid][7], 1);
  186.         PlayerTextDrawLetterSize(playerid, GuideTDs[playerid][7], 0.280000, 1.000000);
  187.         PlayerTextDrawColor(playerid, GuideTDs[playerid][7], -1);
  188.         PlayerTextDrawSetOutline(playerid, GuideTDs[playerid][7], 0);
  189.         PlayerTextDrawSetProportional(playerid, GuideTDs[playerid][7], 1);
  190.         PlayerTextDrawSetShadow(playerid, GuideTDs[playerid][7], 1);
  191.  
  192.         for(new i = 0; i<10; i++) PlayerTextDrawShow(playerid,GuideTDs[playerid][i]);
  193.         _GuideSite[playerid] = 0;
  194.     }
  195.     else if(toggle == true && _GuideToggled[playerid] > -1) {
  196.         for(new i = 0; i<10; i++) PlayerTextDrawHide(playerid, GuideTDs[playerid][i]), PlayerTextDrawShow(playerid,GuideTDs[playerid][i]);
  197.     }
  198.     else if(toggle == false) {
  199.         for(new i = 0; i<10; i++) {
  200.             PlayerTextDrawDestroy(playerid, GuideTDs[playerid][i]);
  201.             PlayerTextDrawHide(playerid, GuideTDs[playerid][i]);
  202.         }
  203.         _GuideToggled[playerid] = -1;
  204.     }
  205.     return 0;
  206. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement