_Urrutia_

[Filterscript] News servers

Jul 13th, 2013
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.56 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. new Text:Box1,Text:Box2,Text:Caract,Text:Nov,Text:Creditos;
  7. #define Creditos_Dialog 01
  8. #define Nov_Dialog 02
  9. #define Dialog ShowPlayerDialog
  10. #if defined FILTERSCRIPT
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("-===============================-");
  15.     print("Starting script - developers: NONE");
  16.     print("-===============================-");
  17.     return 1;
  18. }
  19.  
  20. #else
  21.  
  22. #endif
  23.  
  24. public OnGameModeInit()
  25. {
  26.     Box1 = TextDrawCreate(510.000000, 159.000000, "_");
  27.     TextDrawBackgroundColor(Box1, 255);
  28.     TextDrawFont(Box1, 1);
  29.     TextDrawLetterSize(Box1, 0.500000, 17.000000);
  30.     TextDrawColor(Box1, -1);
  31.     TextDrawSetOutline(Box1, 0);
  32.     TextDrawSetProportional(Box1, 1);
  33.     TextDrawSetShadow(Box1, 1);
  34.     TextDrawUseBox(Box1, 1);
  35.     TextDrawBoxColor(Box1, 75);
  36.     TextDrawTextSize(Box1, 160.000000, 0.000000);
  37.  
  38.     Box2 = TextDrawCreate(510.000000, 159.000000, "_");
  39.     TextDrawBackgroundColor(Box2, 255);
  40.     TextDrawFont(Box2, 1);
  41.     TextDrawLetterSize(Box2, 0.500000, 3.000000);
  42.     TextDrawColor(Box2, -1);
  43.     TextDrawSetOutline(Box2, 0);
  44.     TextDrawSetProportional(Box2, 1);
  45.     TextDrawSetShadow(Box2, 1);
  46.     TextDrawUseBox(Box2, 1);
  47.     TextDrawBoxColor(Box2, 75);
  48.     TextDrawTextSize(Box2, 160.000000, 0.000000);
  49.  
  50.     Caract = TextDrawCreate(250.000000, 160.000000, "Features");
  51.     TextDrawBackgroundColor(Caract, 255);
  52.     TextDrawFont(Caract, 2);
  53.     TextDrawLetterSize(Caract, 0.400000, 2.000000);
  54.     TextDrawColor(Caract, -1);
  55.     TextDrawSetOutline(Caract, 0);
  56.     TextDrawSetProportional(Caract, 1);
  57.     TextDrawSetShadow(Caract, 1);
  58.  
  59.     Nov = TextDrawCreate(200.000000, 239.000000, "Developers");
  60.     TextDrawBackgroundColor(Nov, 255);
  61.     TextDrawFont(Nov, 3);
  62.     TextDrawLetterSize(Nov, 0.600000, 2.099999);
  63.     TextDrawColor(Nov, 0xBFFF1C);
  64.     TextDrawSetOutline(Nov, 0);
  65.     TextDrawSetProportional(Nov, 1);
  66.     TextDrawSetShadow(Nov, 1);
  67.  
  68.     Creditos = TextDrawCreate(370.000000, 239.000000, "News");
  69.     TextDrawBackgroundColor(Creditos, 255);
  70.     TextDrawFont(Creditos, 3);
  71.     TextDrawLetterSize(Creditos, 0.600000, 2.099999);
  72.     TextDrawColor(Creditos, 0xBFFF1C);
  73.     TextDrawSetOutline(Creditos, 0);
  74.     TextDrawSetProportional(Creditos, 1);
  75.     TextDrawSetShadow(Creditos, 1);
  76.     TextDrawSetSelectable(Nov, true);
  77.     TextDrawSetSelectable(Creditos, true);
  78.     return 1;
  79. }
  80.  
  81. public OnPlayerCommandText(playerid, cmdtext[])
  82. {
  83.     if (strcmp("/newsv", cmdtext, true, 10) == 0)
  84.     {
  85.         TextDrawShowForPlayer(playerid, Caract);
  86.         TextDrawShowForPlayer(playerid, Nov);
  87.         TextDrawShowForPlayer(playerid, Creditos);
  88.         TextDrawShowForPlayer(playerid, Box1);
  89.         TextDrawShowForPlayer(playerid, Box2);
  90.         SelectTextDraw(playerid, 0xA3B4C5FF);
  91.         return 1;
  92.     }
  93.     return 0;
  94. }
  95. public OnPlayerClickTextDraw(playerid, Text:clickedid)
  96. {
  97.     if(_:clickedid != INVALID_TEXT_DRAW)
  98.     {
  99.     if(clickedid == Nov)
  100.     {
  101.     Dialog(playerid, Nov_Dialog,DIALOG_STYLE_MSGBOX,"Server News","News:\n\n {BFFF1C}Added new mappings for the server\n\nAdded new jobs and more factions","Accept","Close");
  102.     }
  103.     else if(clickedid == Creditos)
  104.     {
  105.     Dialog(playerid, Creditos_Dialog,DIALOG_STYLE_MSGBOX,"Developers","Developers:\n\n{BFFF1C} CEO & Founder Urrutia and ZumeZero\n\nThank you for entering the server","Accept","Close");
  106.     }
  107.     TextDrawHideForPlayer(playerid, Box1);
  108.     TextDrawHideForPlayer(playerid, Box2);
  109.     TextDrawHideForPlayer(playerid, Nov);
  110.     TextDrawHideForPlayer(playerid, Caract);
  111.     TextDrawHideForPlayer(playerid, Creditos);
  112.     CancelSelectTextDraw(playerid);
  113.     }
  114.     return 1;
  115. }
Advertisement
Add Comment
Please, Sign In to add comment