Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Text:ChristmassTextDraw0;
- new Text:ChristmassTextDraw1;
- new Text:ChristmassTextDraw2;
- new Text:ChristmassTextDraw3;
- new Text:ChristmassTextDraw4;
- new Text:ChristmassTextDraw5;
- new h,m,s;
- forward UpdateTime();
- public OnFilterScriptInit()
- {
- LoadChristmasTextDraw();
- SetTimer("UpdateTime", 800, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public UpdateTime()
- {
- new string[9];
- gettime(h,m,s);
- format(string, sizeof(string), "%d days", 358-getdate());
- TextDrawSetString(ChristmassTextDraw0, string);
- format(string, sizeof(string), "%d:%d:%d",23-h,59-m,60-s);
- TextDrawSetString(ChristmassTextDraw1, string);
- if((358-getdate() == 0) && (23-h == 0) && (59-m == 0) && (60-s == 0))
- TextDrawShowForAll(ChristmassTextDraw5);
- }
- public OnPlayerConnect(playerid)
- {
- TextDrawShowForPlayer(playerid, ChristmassTextDraw0);
- TextDrawShowForPlayer(playerid, ChristmassTextDraw1);
- TextDrawShowForPlayer(playerid, ChristmassTextDraw2);
- TextDrawShowForPlayer(playerid, ChristmassTextDraw3);
- TextDrawShowForPlayer(playerid, ChristmassTextDraw4);
- if((358-getdate() < 0) && (23-h == 0) && (59-m == 0) && (60-s == 0))
- TextDrawShowForAll(ChristmassTextDraw5);
- return 1;
- }
- stock LoadChristmasTextDraw()
- {
- ChristmassTextDraw0 = TextDrawCreate(503.500000, 340.375000, "24 days");
- TextDrawLetterSize(ChristmassTextDraw0, 0.449999, 1.600000);
- TextDrawAlignment(ChristmassTextDraw0, 1);
- TextDrawColor(ChristmassTextDraw0, -16776961);
- TextDrawSetShadow(ChristmassTextDraw0, 0);
- TextDrawSetOutline(ChristmassTextDraw0, 1);
- TextDrawBackgroundColor(ChristmassTextDraw0, -1);
- TextDrawFont(ChristmassTextDraw0, 1);
- TextDrawSetProportional(ChristmassTextDraw0, 1);
- ChristmassTextDraw1 = TextDrawCreate(499.500000, 354.375000, "00:00:00");
- TextDrawLetterSize(ChristmassTextDraw1, 0.449999, 1.600000);
- TextDrawAlignment(ChristmassTextDraw1, 1);
- TextDrawColor(ChristmassTextDraw1, -16776961);
- TextDrawUseBox(ChristmassTextDraw1, true);
- TextDrawBoxColor(ChristmassTextDraw1, 0);
- TextDrawSetShadow(ChristmassTextDraw1, 0);
- TextDrawSetOutline(ChristmassTextDraw1, 1);
- TextDrawBackgroundColor(ChristmassTextDraw1, -1);
- TextDrawFont(ChristmassTextDraw1, 1);
- TextDrawSetProportional(ChristmassTextDraw1, 1);
- ChristmassTextDraw2 = TextDrawCreate(444.500000, 309.750000, "New Textdraw");
- TextDrawLetterSize(ChristmassTextDraw2, 0.449999, 1.600000);
- TextDrawTextSize(ChristmassTextDraw2, 70.000000, 50.312500);
- TextDrawAlignment(ChristmassTextDraw2, 1);
- TextDrawColor(ChristmassTextDraw2, -1);
- TextDrawUseBox(ChristmassTextDraw2, true);
- TextDrawBoxColor(ChristmassTextDraw2, -256);
- TextDrawSetShadow(ChristmassTextDraw2, 0);
- TextDrawSetOutline(ChristmassTextDraw2, 1);
- TextDrawBackgroundColor(ChristmassTextDraw2, -256);
- TextDrawFont(ChristmassTextDraw2, 5);
- TextDrawSetProportional(ChristmassTextDraw2, 1);
- TextDrawSetPreviewModel(ChristmassTextDraw2, 19057);
- TextDrawSetPreviewRot(ChristmassTextDraw2, -45.000000, 45.000000, 45.000000, 1.000000);
- ChristmassTextDraw3 = TextDrawCreate(552.500000, 311.937500, "New Textdraw");
- TextDrawLetterSize(ChristmassTextDraw3, 0.449999, 1.600000);
- TextDrawTextSize(ChristmassTextDraw3, 77.500000, 50.312500);
- TextDrawAlignment(ChristmassTextDraw3, 1);
- TextDrawColor(ChristmassTextDraw3, -1);
- TextDrawUseBox(ChristmassTextDraw3, true);
- TextDrawBoxColor(ChristmassTextDraw3, 0);
- TextDrawSetShadow(ChristmassTextDraw3, 0);
- TextDrawSetOutline(ChristmassTextDraw3, 1);
- TextDrawBackgroundColor(ChristmassTextDraw3, -256);
- TextDrawFont(ChristmassTextDraw3, 5);
- TextDrawSetProportional(ChristmassTextDraw3, 1);
- TextDrawSetPreviewModel(ChristmassTextDraw3, 19057);
- TextDrawSetPreviewRot(ChristmassTextDraw3, -45.000000, -45.000000, 45.000000, 1.000000);
- ChristmassTextDraw4 = TextDrawCreate(460.500000, 229.250000, "New Textdraw");
- TextDrawLetterSize(ChristmassTextDraw4, 0.449999, 1.600000);
- TextDrawTextSize(ChristmassTextDraw4, 142.500000, 131.250000);
- TextDrawAlignment(ChristmassTextDraw4, 1);
- TextDrawColor(ChristmassTextDraw4, -1);
- TextDrawUseBox(ChristmassTextDraw4, true);
- TextDrawBoxColor(ChristmassTextDraw4, 0);
- TextDrawSetShadow(ChristmassTextDraw4, 0);
- TextDrawSetOutline(ChristmassTextDraw4, 1);
- TextDrawBackgroundColor(ChristmassTextDraw4, -256);
- TextDrawFont(ChristmassTextDraw4, 5);
- TextDrawSetProportional(ChristmassTextDraw4, 1);
- TextDrawSetPreviewModel(ChristmassTextDraw4, 19076);
- TextDrawSetPreviewRot(ChristmassTextDraw4, 0.000000, 0.000000, 0.000000, 1.000000);
- ChristmassTextDraw5 = TextDrawCreate(480.500000, 367.500000, "Happy Christmas");
- TextDrawLetterSize(ChristmassTextDraw5, 0.449999, 1.600000);
- TextDrawAlignment(ChristmassTextDraw5, 1);
- TextDrawColor(ChristmassTextDraw5, -16776961);
- TextDrawSetShadow(ChristmassTextDraw5, 0);
- TextDrawSetOutline(ChristmassTextDraw5, 1);
- TextDrawBackgroundColor(ChristmassTextDraw5, -1);
- TextDrawFont(ChristmassTextDraw5, 1);
- TextDrawSetProportional(ChristmassTextDraw5, 1);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement