Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ~Real Time Sample Clock Filter Scipter San Andreas: Multiplayer by Wiper:
- * ~Filter Script started on 28/07/2015 , 9:00AM
- * ~Filter Script finished on 28/07/2015, 10:00AM
- * ~Work time: 30 Minutes | Test time: 15 Minutes
- * ~Rested 10 minutes having breakfast
- * ~Credits: SA:MP Team
- */
- #define FILTERSCRIPT
- #include <a_samp>
- #define SNAME_COL 0x8A2BE2FF
- #define SDATE_COL 0x7458C1FF
- #define STIME_COL 0x1E90FFFF
- #define SERV_NAME "eGaming RPG"
- new Text:ServerName;
- new Text:ServerDate;
- new Text:ServerTime;
- new const MonthName[][12] =
- {
- "January", "February", "March", "April", "May", "June",
- "July", "August", "September", "October", "November", "December"
- };
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------------------------------------");
- print(" Sample Clock Filter Script SA:MP by Wiper has successfully loaded !");
- print("--------------------------------------------------------------------\n");
- SetTimer("TimeSet", 1000, true);
- ServerName = TextDrawCreate(475.0, 4.000, SERV_NAME);
- ServerDate = TextDrawCreate(550.0, 17.00, "--");
- ServerTime = TextDrawCreate(547.5, 30.33, "--");
- TextDrawFont(ServerName, 1);
- TextDrawFont(ServerDate, 3);
- TextDrawFont(ServerTime, 1);
- TextDrawColor(ServerName, SNAME_COL);
- TextDrawColor(ServerDate, SDATE_COL);
- TextDrawColor(ServerTime, STIME_COL);
- TextDrawLetterSize(ServerName, 0.700, 1.533);
- TextDrawLetterSize(ServerDate, 0.443, 1.150);
- TextDrawLetterSize(ServerTime, 0.600, 1.614);
- TextDrawSetShadow(ServerName, 0);
- TextDrawSetShadow(ServerDate, 0);
- TextDrawSetShadow(ServerTime, 0);
- TextDrawSetOutline(ServerName, 0);
- TextDrawSetOutline(ServerDate, 0);
- TextDrawSetOutline(ServerTime, 0);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n-----------------------------------------------------------");
- print(" Sample Clock Filter Script SA:MP by Wiper failed to load !");
- print("-----------------------------------------------------------\n");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, ServerName);
- TextDrawShowForPlayer(playerid, ServerDate);
- TextDrawShowForPlayer(playerid, ServerTime);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, ServerName);
- TextDrawHideForPlayer(playerid, ServerDate);
- TextDrawHideForPlayer(playerid, ServerTime);
- return 1;
- }
- forward TimeSet( );
- public TimeSet( )
- {
- new String[2][256];
- new yYear, mMonth, dDay,
- hHour, mMinute, sSecond;
- getdate(yYear, mMonth, dDay);
- gettime(hHour, mMinute, sSecond);
- format(String[0], 256, "%d %s", dDay, MonthName[mMonth-1]);
- format(String[1], 256, "%02d:%02d", hHour, mMinute);
- TextDrawSetString(ServerDate, String[0]);
- TextDrawSetString(ServerTime, String[1]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement