Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------Credits--------------------
- //--------Lookin---------------------
- //Copyright © 2010 - 2013 LScripting Productions
- //-----------------------------------
- #include <a_samp>
- #define LIGHT_BLUE 0x33CCFFAA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_WHITE 0xFFFFFFAA
- forward KiwiBot1();
- forward KiwiBot2();
- forward KiwiBot3();
- forward KiwiBot4();
- forward KiwiBot5();
- forward KiwiBot6();
- forward KiwiBot7();
- forward KiwiBot8();
- forward AutoWeather(playerid);
- new Text:TextdrawHour;
- new Text:TextdrawMinute;
- new Text:TextdrawSeconds;
- new Text:TextdrawDay;
- new Text:TextdrawMonth;
- new Spring[8] =
- {
- 1,10,11,14,17,23,29,33
- };
- new Summer[5] =
- {
- 0,1,10,11,19
- };
- new Autumn[10] =
- {
- 7,8,9,12,15,16,17,25,30,32
- };
- new Winter[13] =
- {
- 1,4,5,7,8,9,12,15,17,20,25,27,30
- };
- public OnFilterScriptInit()
- {
- print("..........");
- print(" initiating.....");
- print("Lookins AmAw V4 initiated!......");
- print(" initiating KiwiBot....");
- SetTimer("KiwiBot2",30000,false);
- print(" KiwiBot initiated!......");
- print(" initiating AutoWeather....");
- SetTimer("AutoWeather", 1000, true);
- print(" AutoWeather initiated!......");
- new Year, Month, Day;
- new Hour, Minute, Second;
- new smrrndm = random(sizeof(Summer));
- new wntrrndm = random(sizeof(Winter));
- new sprngrndm = random(sizeof(Spring));
- new autmrndm = random(sizeof(Autumn));
- getdate(Year, Month, Day);
- gettime(Hour, Minute, Second);
- TextdrawHour = TextDrawCreate(546.000000,22.000000,"--");
- TextDrawAlignment(TextdrawHour,0);
- TextDrawBackgroundColor(TextdrawHour,COLOR_BLACK);
- TextDrawFont(TextdrawHour,3);
- TextDrawLetterSize(TextdrawHour,0.634,2.4);
- TextDrawColor(TextdrawHour,COLOR_WHITE);
- TextDrawSetOutline(TextdrawHour,1);
- TextDrawSetProportional(TextdrawHour,1);
- TextDrawSetShadow(TextdrawHour,1);
- TextdrawMinute = TextDrawCreate(570.200000,22.000000,"--");
- TextDrawAlignment(TextdrawMinute,0);
- TextDrawBackgroundColor(TextdrawMinute,COLOR_BLACK);
- TextDrawFont(TextdrawMinute,3);
- TextDrawLetterSize(TextdrawMinute,0.634,2.4);
- TextDrawColor(TextdrawMinute,COLOR_WHITE);
- TextDrawSetOutline(TextdrawMinute,1);
- TextDrawSetProportional(TextdrawMinute,1);
- TextDrawSetShadow(TextdrawMinute,1);
- TextdrawSeconds = TextDrawCreate(606.500000,33.000000,"--");
- TextDrawAlignment(TextdrawSeconds,0);
- TextDrawBackgroundColor(TextdrawSeconds,COLOR_BLACK);
- TextDrawFont(TextdrawSeconds,3);
- TextDrawLetterSize(TextdrawSeconds,0.3,1.0);
- TextDrawColor(TextdrawSeconds,COLOR_WHITE);
- TextDrawSetOutline(TextdrawSeconds,1);
- TextDrawSetProportional(TextdrawSeconds,1);
- TextDrawSetShadow(TextdrawSeconds,1);
- TextdrawDay = TextDrawCreate(551.000000, 54.000000, "--");
- TextDrawAlignment(TextdrawDay, 2);
- TextDrawBackgroundColor(TextdrawDay, COLOR_BLACK);
- TextDrawFont(TextdrawDay, 3);
- TextDrawLetterSize(TextdrawDay, 0.289999, 1.299999);
- TextDrawColor(TextdrawDay, -1);
- TextDrawSetOutline(TextdrawDay, 1);
- TextDrawSetProportional(TextdrawDay, 1);
- TextdrawMonth = TextDrawCreate(585.000000, 54.000000, "---------");
- TextDrawAlignment(TextdrawMonth, 2);
- TextDrawBackgroundColor(TextdrawMonth, COLOR_BLACK);
- TextDrawFont(TextdrawMonth, 3);
- TextDrawLetterSize(TextdrawMonth, 0.289999, 1.299999);
- TextDrawColor(TextdrawMonth, COLOR_WHITE);
- TextDrawSetOutline(TextdrawMonth, 1);
- TextDrawSetProportional(TextdrawMonth, 1);
- if(Month == 12)
- {
- if(Day <21)
- {
- SetWeather(Autumn[autmrndm]);
- }
- else
- {
- SetWeather(Winter[wntrrndm]);
- }
- }
- else if(Month == 1 || Month == 2)
- {
- SetWeather(wntrrndm);
- }
- else if(Month == 3)
- {
- if(Day <21)
- {
- SetWeather(Winter[wntrrndm]);
- }
- else
- {
- SetWeather(Spring[sprngrndm]);
- }
- }
- else if (Month == 4 || Month == 5)
- {
- SetWeather(Spring[sprngrndm]);
- }
- else if(Month == 6)
- {
- if(Day <21)
- {
- SetWeather(Spring[sprngrndm]);
- }
- else
- {
- SetWeather(Summer[smrrndm]);
- }
- }
- else if(Month == 7 || Month == 8)
- {
- SetWeather(Summer[smrrndm]);
- }
- else if(Month == 9)
- {
- if(Day <21)
- {
- SetWeather(Summer[smrrndm]);
- }
- else
- {
- SetWeather(Autumn[autmrndm]);
- }
- }
- else if(Month == 10 || Month == 11)
- {
- SetWeather(Autumn[autmrndm]);
- }
- if(Hour == 22){SetWorldTime(22);}
- else{SetWorldTime(Hour);}
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawDestroy(TextdrawHour);
- TextDrawDestroy(TextdrawMinute);
- TextDrawDestroy(TextdrawSeconds);
- TextDrawDestroy(TextdrawDay);
- TextDrawDestroy(TextdrawMonth);
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- TextDrawHideForPlayer(playerid,TextdrawHour);
- TextDrawHideForPlayer(playerid,TextdrawMinute);
- TextDrawHideForPlayer(playerid,TextdrawSeconds);
- TextDrawHideForPlayer(playerid,TextdrawDay);
- TextDrawHideForPlayer(playerid,TextdrawMonth);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawHideForPlayer(playerid,TextdrawHour);
- TextDrawHideForPlayer(playerid,TextdrawMinute);
- TextDrawHideForPlayer(playerid,TextdrawSeconds);
- TextDrawHideForPlayer(playerid,TextdrawDay);
- TextDrawHideForPlayer(playerid,TextdrawMonth);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid,TextdrawHour);
- TextDrawHideForPlayer(playerid,TextdrawMinute);
- TextDrawHideForPlayer(playerid,TextdrawSeconds);
- TextDrawHideForPlayer(playerid,TextdrawDay);
- TextDrawHideForPlayer(playerid,TextdrawMonth);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid,TextdrawHour);
- TextDrawShowForPlayer(playerid,TextdrawMinute);
- TextDrawShowForPlayer(playerid,TextdrawSeconds);
- TextDrawShowForPlayer(playerid,TextdrawDay);
- TextDrawShowForPlayer(playerid,TextdrawMonth);
- return 1;
- }
- public KiwiBot1()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! I'm KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot2",300000,false);
- return 1;
- }
- public KiwiBot2()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot3",300000,false);
- return 1;
- }
- public KiwiBot3()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot4",300000,false);
- return 1;
- }
- public KiwiBot4()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot5",300000,false);
- return 1;
- }
- public KiwiBot5()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot6",300000,false);
- return 1;
- }
- public KiwiBot6()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot7",300000,false);
- return 1;
- }
- public KiwiBot7()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot8",300000,false);
- return 1;
- }
- public KiwiBot8()
- {
- SendClientMessageToAll(LIGHT_BLUE,"KiwiBot:{FFFFFF} Hi there! Im KiwiBot, V4 Of Lookin's AmAw");
- SetTimer("KiwiBot1",300000,false);
- return 1;
- }
- public AutoWeather(playerid)
- {
- new string[256];
- new Hour, Minute, Second;
- new Year, Month, Day;
- new smrrndm = random(sizeof(Summer));
- new wntrrndm = random(sizeof(Winter));
- new sprngrndm = random(sizeof(Spring));
- new autmrndm = random(sizeof(Autumn));
- gettime(Hour,Minute,Second);
- getdate(Year, Month, Day);
- format(string, sizeof(string), "%02d", Hour);
- TextDrawSetString(TextdrawHour, string);
- format(string, sizeof(string), ":%02d", Minute);
- TextDrawSetString(TextdrawMinute, string);
- format(string, sizeof(string), ":%02d", Second);
- TextDrawSetString(TextdrawSeconds, string);
- SetPlayerTime(playerid, Hour, Minute);
- format(string, sizeof(string), "%02d", Day);
- TextDrawSetString(TextdrawDay, string);
- if(Month == 1)
- {
- format(string, sizeof(string), " Jan");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 2)
- {
- format(string, sizeof(string), " Feb");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 3)
- {
- format(string, sizeof(string), " Mar");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 4)
- {
- format(string, sizeof(string), " Apr");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 5)
- {
- format(string, sizeof(string), " May");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 6)
- {
- format(string, sizeof(string), " Jun");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 7)
- {
- format(string, sizeof(string), " Jul");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 8)
- {
- format(string, sizeof(string), " Aug");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 9)
- {
- format(string, sizeof(string), " Sept");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 10)
- {
- format(string, sizeof(string), " Oct");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 11)
- {
- format(string, sizeof(string), " Nov");
- TextDrawSetString(TextdrawMonth, string);
- }
- else if(Month == 12)
- {
- format(string, sizeof(string), " Dec");
- TextDrawSetString(TextdrawMonth, string);
- }
- if(Minute == 0 && Second == 0)
- {
- format(string, sizeof(string), "It's %02d o' clock. The weather is changing.",Hour);
- SendClientMessageToAll(LIGHT_BLUE, string);
- format(string, sizeof(string), "The weather has changed. [%02d:%02d:%02d]",Hour, Minute, Second);
- print(string);
- if(Month == 12)
- {
- if(Day <21)
- {
- SetWeather(Autumn[autmrndm]);
- }
- //Winter
- else
- {
- SetWeather(Winter[wntrrndm]);
- }
- }
- else if(Month == 1 || Month == 2)
- {
- SetWeather(wntrrndm);
- }
- else if(Month == 3)
- {
- if(Day <21)
- {
- SetWeather(Winter[wntrrndm]);
- }
- //Spring
- else
- {
- SetWeather(Spring[sprngrndm]);
- }
- }
- else if (Month == 4 || Month == 5)
- {
- SetWeather(Spring[sprngrndm]);
- }
- else if(Month == 6)
- {
- if(Day <21)
- {
- SetWeather(Spring[sprngrndm]);
- }
- //Summer
- else
- {
- SetWeather(Summer[smrrndm]);
- }
- }
- else if(Month == 7 || Month == 8)
- {
- SetWeather(Summer[smrrndm]);
- }
- else if(Month == 9)
- {
- if(Day <21)
- {
- SetWeather(Summer[smrrndm]);
- }
- //Autumn
- else
- {
- SetWeather(Autumn[autmrndm]);
- }
- }
- else if(Month == 10 || Month == 11)
- {
- SetWeather(Autumn[autmrndm]);
- }
- if(Hour == 22){SetWorldTime(22);}
- else{SetWorldTime(Hour);}
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement