Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Random server poruke sat i datum by mark
- */
- #include <a_samp>
- //---------------------------------------------------------------------------------------
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Text:Textdraw3;
- new Text:Textdraw4;
- new Text:Textdraw5;
- new Text:Textdraw6;
- new Text:Textdraw7;
- new Text:Textdraw8;
- new Text:Sat0;
- new Text:datum;
- //---------------------------------------------------------------------------------------
- forward RandomMessage();
- forward Sat(playerid);
- forward setdatum(playerid);
- //---------------------------------------------------------------------------------------
- new RandomMessages[][] =
- {
- "~y~Server poruke: ~w~Posjetite nas forum ~r~www.uskoro.com ~w~i registrujte se.",
- "~y~Server poruke: ~w~Ukoliko primjetite citera ili bug prijavite ga na ~r~/report.",
- "~y~Server poruke: ~w~Ukoliko ste novi igrac i ako vam treba pomoc ~r~/new ~w~ili ~r~/askq.",
- "~y~Server poruke: ~w~Ukoliko ne poznajte dobro Los Santos kucajte ~r~/gps.",
- "~y~Server poruke: ~w~Za ulazak u organizaciju potreban je level ~r~3.",
- "~y~Server poruke: ~w~Sve komande mozete pronaci na ~r~/komande.",
- "~y~Server poruke: ~w~Trenutna verzija moda ~r~v1.0 by Mark.",
- "~y~Server poruke: ~w~Forum:~r~www.uskoro.com",
- "~y~Server poruke: ~w~Da pricate sa gradjanima Los Santosa ~r~/teamspeak.",
- "~y~Server poruke: ~w~Reklamiranje strogo ~r~kaznjavamo",
- "~y~Server poruke: ~w~Ako zelite level 3 i 50.000$ potrazite ih na ~r~forumu",
- "~y~Server poruke: ~w~Dobrodosli na ~r~Mark Script ~w~roleplay server",
- "~y~Server poruke: ~w~Da vidite litnu online lidera kucajte ~r~/lideri",
- "~y~Server poruke: ~w~Da vidite listu online helpera kucajte ~r~helperi"
- };
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- TextDrawShowForPlayer(playerid, Textdraw4);
- TextDrawShowForPlayer(playerid, Textdraw5);
- TextDrawShowForPlayer(playerid, Textdraw6);
- TextDrawShowForPlayer(playerid, Textdraw7);
- TextDrawShowForPlayer(playerid, Textdraw8);
- TextDrawShowForPlayer(playerid, Sat0);
- TextDrawShowForPlayer(playerid, datum);
- return 1;
- }
- public OnGameModeInit()
- {
- SetTimer("RandomMessage", 6000, true);
- SetTimer("Sat",1000,true);
- SetTimer("setdatum",1000, 1);
- //------------------------------------------Textdravovi----------------------------------
- Textdraw0 = TextDrawCreate(641.199951, 435.313323, "usebox");
- TextDrawLetterSize(Textdraw0, 0.000000, 1.176666);
- TextDrawTextSize(Textdraw0, -2.000000, 0.000000);
- TextDrawAlignment(Textdraw0, 1);
- TextDrawColor(Textdraw0, 0);
- TextDrawUseBox(Textdraw0, true);
- TextDrawBoxColor(Textdraw0, 102);
- TextDrawSetShadow(Textdraw0, 0);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawFont(Textdraw0, 0);
- Textdraw1 = TextDrawCreate(639.199951, 433.813323, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw1, -0.176800, -3.434661);
- TextDrawTextSize(Textdraw1, -641.600036, -2.239995);
- TextDrawAlignment(Textdraw1, 1);
- TextDrawColor(Textdraw1, 41215);
- TextDrawSetShadow(Textdraw1, 0);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawFont(Textdraw1, 4);
- Textdraw2 = TextDrawCreate(0.000000, 445.013336, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw2, 0.138400, -0.059733);
- TextDrawTextSize(Textdraw2, 640.000000, 2.986663);
- TextDrawAlignment(Textdraw2, 1);
- TextDrawColor(Textdraw2, 41215);
- TextDrawSetShadow(Textdraw2, 0);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawFont(Textdraw2, 4);
- Textdraw3 = TextDrawCreate(3.200111, 433.066772, "DA VIDITE LISTU ONLINE ADMINA KUCAJTE /ADMINI");
- TextDrawLetterSize(Textdraw3, 0.260400, 1.241600);
- TextDrawAlignment(Textdraw3, 1);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetShadow(Textdraw3, 0);
- TextDrawSetOutline(Textdraw3, 0);
- TextDrawBackgroundColor(Textdraw3, 51);
- TextDrawFont(Textdraw3, 2);
- TextDrawSetProportional(Textdraw3, 1);
- Textdraw4 = TextDrawCreate(378.000000, 434.566650, "usebox");
- TextDrawLetterSize(Textdraw4, 0.000000, -2.888515);
- TextDrawTextSize(Textdraw4, 502.000000, 0.000000);
- TextDrawAlignment(Textdraw4, 1);
- TextDrawColor(Textdraw4, 0);
- TextDrawUseBox(Textdraw4, true);
- TextDrawBoxColor(Textdraw4, 102);
- TextDrawSetShadow(Textdraw4, 0);
- TextDrawSetOutline(Textdraw4, 0);
- TextDrawFont(Textdraw4, 0);
- Textdraw5 = TextDrawCreate(507.199981, 413.653137, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw5, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw5, -132.000000, -2.239990);
- TextDrawAlignment(Textdraw5, 1);
- TextDrawColor(Textdraw5, 41215);
- TextDrawSetShadow(Textdraw5, 0);
- TextDrawSetOutline(Textdraw5, 0);
- TextDrawFont(Textdraw5, 4);
- Textdraw6 = TextDrawCreate(376.000000, 431.573333, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw6, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw6, -4.000000, -20.160003);
- TextDrawAlignment(Textdraw6, 1);
- TextDrawColor(Textdraw6, 41215);
- TextDrawSetShadow(Textdraw6, 0);
- TextDrawSetOutline(Textdraw6, 0);
- TextDrawFont(Textdraw6, 4);
- Textdraw7 = TextDrawCreate(509.599761, 431.573333, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw7, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw7, -4.800018, -20.160003);
- TextDrawAlignment(Textdraw7, 1);
- TextDrawColor(Textdraw7, 41215);
- TextDrawSetShadow(Textdraw7, 0);
- TextDrawSetOutline(Textdraw7, 0);
- TextDrawFont(Textdraw7, 4);
- Textdraw8 = TextDrawCreate(437.599975, 411.413330, "LD_SPAC:white");
- TextDrawLetterSize(Textdraw8, 0.000000, 0.000000);
- TextDrawTextSize(Textdraw8, 4.000030, 20.906646);
- TextDrawAlignment(Textdraw8, 1);
- TextDrawColor(Textdraw8, 41215);
- TextDrawSetShadow(Textdraw8, 0);
- TextDrawSetOutline(Textdraw8, 0);
- TextDrawFont(Textdraw8, 4);
- Sat0 = TextDrawCreate(378.400024, 413.653289, "23:06:34");
- TextDrawLetterSize(Sat0, 0.266000, 1.562666);
- TextDrawAlignment(Sat0, 1);
- TextDrawColor(Sat0, -1);
- TextDrawSetShadow(Sat0, 0);
- TextDrawSetOutline(Sat0, 1);
- TextDrawBackgroundColor(Sat0, 51);
- TextDrawFont(Sat0, 2);
- TextDrawSetProportional(Sat0, 1);
- datum = TextDrawCreate(444.000000, 414.399963, "01/01/2014");
- TextDrawLetterSize(datum, 0.250000, 1.637333);
- TextDrawAlignment(datum, 1);
- TextDrawColor(datum, -1);
- TextDrawSetShadow(datum, 0);
- TextDrawSetOutline(datum, 1);
- TextDrawBackgroundColor(datum, 51);
- TextDrawFont(datum, 2);
- TextDrawSetProportional(datum, 1);
- return 1;
- }
- public OnGameModeExit()
- {
- TextDrawHideForAll(Textdraw0);
- TextDrawDestroy(Textdraw0);
- TextDrawHideForAll(Textdraw1);
- TextDrawDestroy(Textdraw1);
- TextDrawHideForAll(Textdraw2);
- TextDrawDestroy(Textdraw2);
- TextDrawHideForAll(Textdraw3);
- TextDrawDestroy(Textdraw3);
- TextDrawHideForAll(Textdraw4);
- TextDrawDestroy(Textdraw4);
- TextDrawHideForAll(Textdraw5);
- TextDrawDestroy(Textdraw5);
- TextDrawHideForAll(Textdraw6);
- TextDrawDestroy(Textdraw6);
- TextDrawHideForAll(Textdraw7);
- TextDrawDestroy(Textdraw7);
- TextDrawHideForAll(Textdraw8);
- TextDrawDestroy(Textdraw8);
- TextDrawHideForAll(Sat0);
- TextDrawDestroy(Sat0);
- TextDrawHideForAll(datum);
- TextDrawDestroy(datum);
- return 1;
- }
- //------------------------------------------------------------------------------
- public RandomMessage()
- {
- TextDrawSetString(Textdraw3, RandomMessages[random(sizeof(RandomMessages))]);
- return 1;
- }
- public Sat(playerid)
- {
- new string[128],sati,minute,sekunde;
- gettime(sati, minute, sekunde);
- format(string, sizeof string, "%s%d:%s%d:%s%d", (sati < 10) ? ("0") : (""), sati, (minute < 10) ? ("0") : (""), minute, (sekunde < 10) ? ("0") : (""), sekunde);
- TextDrawSetString(Sat0, string);
- }
- public setdatum()
- {
- new string[128];
- new mtdtext[20];
- new y, month,d;
- getdate(y, month, d);
- if(month == 1) { mtdtext = "01"; }
- else if(month == 2) { mtdtext = "02"; }
- else if(month == 3) { mtdtext = "03"; }
- else if(month == 4) { mtdtext = "04"; }
- else if(month == 5) { mtdtext = "05"; }
- else if(month == 6) { mtdtext = "06"; }
- else if(month == 7) { mtdtext = "07"; }
- else if(month == 8) { mtdtext = "08"; }
- else if(month == 9) { mtdtext = "09"; }
- else if(month == 10) { mtdtext = "10"; }
- else if(month == 11) { mtdtext = "11"; }
- else if(month == 12) { mtdtext = "12"; }
- format(string, sizeof string, "~w~~h~%d~w~/~w~~h~%s~w~/~w~~h~%d", d, mtdtext, y);
- TextDrawSetString(datum, string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement