Advertisement
Guest User

LookinsAmAwV4

a guest
Mar 15th, 2013
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.58 KB | None | 0 0
  1. //--------Credits--------------------
  2. //--------Lookin---------------------
  3. //Copyright © 2010 - 2013 LScripting Productions
  4. //-----------------------------------
  5.  
  6. #include <a_samp>
  7.  
  8. #define LIGHT_BLUE      0x33CCFFAA
  9. #define COLOR_BLACK     0x000000AA
  10. #define COLOR_WHITE     0xFFFFFFAA
  11.  
  12. forward KiwiBot1();
  13. forward KiwiBot2();
  14. forward KiwiBot3();
  15. forward KiwiBot4();
  16. forward KiwiBot5();
  17. forward KiwiBot6();
  18. forward KiwiBot7();
  19. forward KiwiBot8();
  20. forward AutoWeather(playerid);
  21.  
  22. new Text:TextdrawHour;
  23. new Text:TextdrawMinute;
  24. new Text:TextdrawSeconds;
  25. new Text:TextdrawDay;
  26. new Text:TextdrawMonth;
  27. new Spring[8] =
  28. {
  29.     1,10,11,14,17,23,29,33
  30. };
  31. new Summer[5] =
  32. {
  33.     0,1,10,11,19
  34. };
  35. new Autumn[10] =
  36. {
  37.     7,8,9,12,15,16,17,25,30,32
  38. };
  39. new Winter[13] =
  40. {
  41.     1,4,5,7,8,9,12,15,17,20,25,27,30
  42. };
  43.  
  44. public OnFilterScriptInit()
  45. {
  46.     print("..........");
  47.     print(" initiating.....");
  48.     print("Lookins AmAw V4 initiated!......");
  49.     print(" initiating KiwiBot....");
  50.     SetTimer("KiwiBot2",30000,false);
  51.     print(" KiwiBot initiated!......");
  52.     print(" initiating AutoWeather....");
  53.     SetTimer("AutoWeather", 1000, true);
  54.     print(" AutoWeather initiated!......");
  55.     new Year, Month, Day;
  56.     new Hour, Minute, Second;
  57.     new smrrndm = random(sizeof(Summer));
  58.     new wntrrndm = random(sizeof(Winter));
  59.     new sprngrndm = random(sizeof(Spring));
  60.     new autmrndm = random(sizeof(Autumn));
  61.     getdate(Year, Month, Day);
  62.     gettime(Hour, Minute, Second);
  63.     TextdrawHour = TextDrawCreate(546.000000,22.000000,"--");
  64.     TextDrawAlignment(TextdrawHour,0);
  65.     TextDrawBackgroundColor(TextdrawHour,COLOR_BLACK);
  66.     TextDrawFont(TextdrawHour,3);
  67.     TextDrawLetterSize(TextdrawHour,0.634,2.4);
  68.     TextDrawColor(TextdrawHour,COLOR_WHITE);
  69.     TextDrawSetOutline(TextdrawHour,1);
  70.     TextDrawSetProportional(TextdrawHour,1);
  71.     TextDrawSetShadow(TextdrawHour,1);
  72.  
  73.     TextdrawMinute = TextDrawCreate(570.200000,22.000000,"--");
  74.     TextDrawAlignment(TextdrawMinute,0);
  75.     TextDrawBackgroundColor(TextdrawMinute,COLOR_BLACK);
  76.     TextDrawFont(TextdrawMinute,3);
  77.     TextDrawLetterSize(TextdrawMinute,0.634,2.4);
  78.     TextDrawColor(TextdrawMinute,COLOR_WHITE);
  79.     TextDrawSetOutline(TextdrawMinute,1);
  80.     TextDrawSetProportional(TextdrawMinute,1);
  81.     TextDrawSetShadow(TextdrawMinute,1);
  82.  
  83.     TextdrawSeconds = TextDrawCreate(606.500000,33.000000,"--");
  84.     TextDrawAlignment(TextdrawSeconds,0);
  85.     TextDrawBackgroundColor(TextdrawSeconds,COLOR_BLACK);
  86.     TextDrawFont(TextdrawSeconds,3);
  87.     TextDrawLetterSize(TextdrawSeconds,0.3,1.0);
  88.     TextDrawColor(TextdrawSeconds,COLOR_WHITE);
  89.     TextDrawSetOutline(TextdrawSeconds,1);
  90.     TextDrawSetProportional(TextdrawSeconds,1);
  91.     TextDrawSetShadow(TextdrawSeconds,1);
  92.  
  93.     TextdrawDay = TextDrawCreate(551.000000, 54.000000, "--");
  94.     TextDrawAlignment(TextdrawDay, 2);
  95.     TextDrawBackgroundColor(TextdrawDay, COLOR_BLACK);
  96.     TextDrawFont(TextdrawDay, 3);
  97.     TextDrawLetterSize(TextdrawDay, 0.289999, 1.299999);
  98.     TextDrawColor(TextdrawDay, -1);
  99.     TextDrawSetOutline(TextdrawDay, 1);
  100.     TextDrawSetProportional(TextdrawDay, 1);
  101.  
  102.     TextdrawMonth = TextDrawCreate(585.000000, 54.000000, "---------");
  103.     TextDrawAlignment(TextdrawMonth, 2);
  104.     TextDrawBackgroundColor(TextdrawMonth, COLOR_BLACK);
  105.     TextDrawFont(TextdrawMonth, 3);
  106.     TextDrawLetterSize(TextdrawMonth, 0.289999, 1.299999);
  107.     TextDrawColor(TextdrawMonth, COLOR_WHITE);
  108.     TextDrawSetOutline(TextdrawMonth, 1);
  109.     TextDrawSetProportional(TextdrawMonth, 1);
  110.  
  111.     if(Month == 12)
  112.     {
  113.         if(Day <21)
  114.         {
  115.             SetWeather(Autumn[autmrndm]);
  116.         }
  117.         else
  118.         {
  119.             SetWeather(Winter[wntrrndm]);
  120.         }
  121.     }
  122.     else if(Month == 1 || Month == 2)
  123.     {
  124.         SetWeather(wntrrndm);
  125.     }
  126.     else if(Month == 3)
  127.     {
  128.         if(Day <21)
  129.         {
  130.             SetWeather(Winter[wntrrndm]);
  131.         }
  132.         else
  133.         {
  134.             SetWeather(Spring[sprngrndm]);
  135.         }
  136.     }
  137.     else if (Month == 4 || Month == 5)
  138.     {
  139.         SetWeather(Spring[sprngrndm]);
  140.     }
  141.     else if(Month == 6)
  142.     {
  143.         if(Day <21)
  144.         {
  145.             SetWeather(Spring[sprngrndm]);
  146.         }
  147.         else
  148.         {
  149.             SetWeather(Summer[smrrndm]);
  150.         }
  151.     }
  152.     else if(Month == 7 || Month == 8)
  153.     {
  154.         SetWeather(Summer[smrrndm]);
  155.     }
  156.     else if(Month == 9)
  157.     {
  158.         if(Day <21)
  159.         {
  160.             SetWeather(Summer[smrrndm]);
  161.         }
  162.         else
  163.         {
  164.             SetWeather(Autumn[autmrndm]);
  165.         }
  166.     }
  167.     else if(Month == 10 || Month == 11)
  168.     {
  169.         SetWeather(Autumn[autmrndm]);
  170.     }
  171.     if(Hour == 22){SetWorldTime(22);}
  172.     else{SetWorldTime(Hour);}
  173.     return 1;
  174. }
  175.  
  176. public OnFilterScriptExit()
  177. {
  178.     TextDrawDestroy(TextdrawHour);
  179.     TextDrawDestroy(TextdrawMinute);
  180.     TextDrawDestroy(TextdrawSeconds);
  181.     TextDrawDestroy(TextdrawDay);
  182.     TextDrawDestroy(TextdrawMonth);
  183.     return 1;
  184. }
  185.  
  186. public OnPlayerRequestClass(playerid, classid)
  187. {
  188.     TextDrawHideForPlayer(playerid,TextdrawHour);
  189.     TextDrawHideForPlayer(playerid,TextdrawMinute);
  190.     TextDrawHideForPlayer(playerid,TextdrawSeconds);
  191.     TextDrawHideForPlayer(playerid,TextdrawDay);
  192.     TextDrawHideForPlayer(playerid,TextdrawMonth);
  193.     return 1;
  194. }
  195.  
  196. public OnPlayerConnect(playerid)
  197. {
  198.     TextDrawHideForPlayer(playerid,TextdrawHour);
  199.     TextDrawHideForPlayer(playerid,TextdrawMinute);
  200.     TextDrawHideForPlayer(playerid,TextdrawSeconds);
  201.     TextDrawHideForPlayer(playerid,TextdrawDay);
  202.     TextDrawHideForPlayer(playerid,TextdrawMonth);
  203.     return 1;
  204. }
  205.  
  206. public OnPlayerDisconnect(playerid, reason)
  207. {
  208.     TextDrawHideForPlayer(playerid,TextdrawHour);
  209.     TextDrawHideForPlayer(playerid,TextdrawMinute);
  210.     TextDrawHideForPlayer(playerid,TextdrawSeconds);
  211.     TextDrawHideForPlayer(playerid,TextdrawDay);
  212.     TextDrawHideForPlayer(playerid,TextdrawMonth);
  213.     return 1;
  214. }
  215.  
  216. public OnPlayerSpawn(playerid)
  217. {
  218.  
  219.     TextDrawShowForPlayer(playerid,TextdrawHour);
  220.     TextDrawShowForPlayer(playerid,TextdrawMinute);
  221.     TextDrawShowForPlayer(playerid,TextdrawSeconds);
  222.     TextDrawShowForPlayer(playerid,TextdrawDay);
  223.     TextDrawShowForPlayer(playerid,TextdrawMonth);
  224.     return 1;
  225. }
  226.  
  227. public KiwiBot1()
  228. {
  229.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! I'm KiwiBot, V4 Of Lookin's AmAw");
  230.     SetTimer("KiwiBot2",300000,false);
  231.     return 1;
  232. }
  233.  
  234. public KiwiBot2()
  235. {
  236.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  237.     SetTimer("KiwiBot3",300000,false);
  238.     return 1;
  239. }
  240.  
  241. public KiwiBot3()
  242. {
  243.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  244.     SetTimer("KiwiBot4",300000,false);
  245.     return 1;
  246. }
  247.  
  248. public KiwiBot4()
  249. {
  250.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  251.     SetTimer("KiwiBot5",300000,false);
  252.     return 1;
  253. }
  254.  
  255. public KiwiBot5()
  256. {
  257.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  258.     SetTimer("KiwiBot6",300000,false);
  259.     return 1;
  260. }
  261.  
  262. public KiwiBot6()
  263. {
  264.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  265.     SetTimer("KiwiBot7",300000,false);
  266.     return 1;
  267. }
  268.  
  269. public KiwiBot7()
  270. {
  271.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  272.     SetTimer("KiwiBot8",300000,false);
  273.     return 1;
  274. }
  275.  
  276. public KiwiBot8()
  277. {
  278.     SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
  279.     SetTimer("KiwiBot1",300000,false);
  280.     return 1;
  281. }
  282.  
  283. public AutoWeather(playerid)
  284. {
  285.     new string[256];
  286.     new Hour, Minute, Second;
  287.     new Year, Month, Day;
  288.     new smrrndm = random(sizeof(Summer));
  289.     new wntrrndm = random(sizeof(Winter));
  290.     new sprngrndm = random(sizeof(Spring));
  291.     new autmrndm = random(sizeof(Autumn));
  292.     gettime(Hour,Minute,Second);
  293.     getdate(Year, Month, Day);
  294.     format(string, sizeof(string), "%02d", Hour);
  295.     TextDrawSetString(TextdrawHour, string);
  296.     format(string, sizeof(string), ":%02d", Minute);
  297.     TextDrawSetString(TextdrawMinute, string);
  298.     format(string, sizeof(string), ":%02d", Second);
  299.     TextDrawSetString(TextdrawSeconds, string);
  300.     SetPlayerTime(playerid, Hour, Minute);
  301.     format(string, sizeof(string), "%02d", Day);
  302.     TextDrawSetString(TextdrawDay, string);
  303.     if(Month == 1)
  304.         {
  305.             format(string, sizeof(string), " Jan");
  306.             TextDrawSetString(TextdrawMonth, string);
  307.         }
  308.     else if(Month == 2)
  309.         {
  310.             format(string, sizeof(string), " Feb");
  311.             TextDrawSetString(TextdrawMonth, string);
  312.         }
  313.     else if(Month == 3)
  314.         {
  315.             format(string, sizeof(string), " Mar");
  316.             TextDrawSetString(TextdrawMonth, string);
  317.         }
  318.     else if(Month == 4)
  319.         {
  320.             format(string, sizeof(string), " Apr");
  321.             TextDrawSetString(TextdrawMonth, string);
  322.         }
  323.     else if(Month == 5)
  324.         {
  325.             format(string, sizeof(string), " May");
  326.             TextDrawSetString(TextdrawMonth, string);
  327.         }
  328.     else if(Month == 6)
  329.         {
  330.             format(string, sizeof(string), " Jun");
  331.             TextDrawSetString(TextdrawMonth, string);
  332.         }
  333.     else if(Month == 7)
  334.         {
  335.             format(string, sizeof(string), " Jul");
  336.             TextDrawSetString(TextdrawMonth, string);
  337.         }
  338.     else if(Month == 8)
  339.         {
  340.             format(string, sizeof(string), " Aug");
  341.             TextDrawSetString(TextdrawMonth, string);
  342.         }
  343.     else if(Month == 9)
  344.         {
  345.             format(string, sizeof(string), " Sept");
  346.             TextDrawSetString(TextdrawMonth, string);
  347.         }
  348.     else if(Month == 10)
  349.         {
  350.             format(string, sizeof(string), " Oct");
  351.             TextDrawSetString(TextdrawMonth, string);
  352.         }
  353.     else if(Month == 11)
  354.         {
  355.             format(string, sizeof(string), " Nov");
  356.             TextDrawSetString(TextdrawMonth, string);
  357.         }
  358.     else if(Month == 12)
  359.         {
  360.             format(string, sizeof(string), " Dec");
  361.             TextDrawSetString(TextdrawMonth, string);
  362.         }
  363.     if(Minute == 0 && Second == 0)
  364.     {
  365.         format(string, sizeof(string), "It's %02d o' clock. The weather is changing.",Hour);
  366.         SendClientMessageToAll(LIGHT_BLUE, string);
  367.         format(string, sizeof(string), "The weather has changed.  [%02d:%02d:%02d]",Hour, Minute, Second);
  368.         print(string);
  369.  
  370.         if(Month == 12)
  371.         {
  372.             if(Day <21)
  373.             {
  374.                 SetWeather(Autumn[autmrndm]);
  375.             }
  376.  
  377.             //Winter
  378.             else
  379.             {
  380.                 SetWeather(Winter[wntrrndm]);
  381.             }
  382.         }
  383.         else if(Month == 1 || Month == 2)
  384.         {
  385.             SetWeather(wntrrndm);
  386.         }
  387.         else if(Month == 3)
  388.         {
  389.             if(Day <21)
  390.             {
  391.                 SetWeather(Winter[wntrrndm]);
  392.             }
  393.  
  394.             //Spring
  395.             else
  396.             {
  397.                 SetWeather(Spring[sprngrndm]);
  398.             }
  399.         }
  400.         else if (Month == 4 || Month == 5)
  401.         {
  402.             SetWeather(Spring[sprngrndm]);
  403.         }
  404.         else if(Month == 6)
  405.         {
  406.             if(Day <21)
  407.             {
  408.                 SetWeather(Spring[sprngrndm]);
  409.             }
  410.  
  411.             //Summer
  412.             else
  413.             {
  414.                 SetWeather(Summer[smrrndm]);
  415.             }
  416.         }
  417.         else if(Month == 7 || Month == 8)
  418.         {
  419.             SetWeather(Summer[smrrndm]);
  420.         }
  421.         else if(Month == 9)
  422.         {
  423.             if(Day <21)
  424.             {
  425.                 SetWeather(Summer[smrrndm]);
  426.             }
  427.  
  428.             //Autumn
  429.             else
  430.             {
  431.                 SetWeather(Autumn[autmrndm]);
  432.             }
  433.         }
  434.         else if(Month == 10 || Month == 11)
  435.         {
  436.             SetWeather(Autumn[autmrndm]);
  437.         }
  438.         if(Hour == 22){SetWorldTime(22);}
  439.         else{SetWorldTime(Hour);}
  440.     }
  441.     return 1;
  442. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement