Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- na vrh
- Kod: [Odaberi]
- new oplayers, Precord, Drecord, Mrecord, Yrecord, THrecord, TMrecord;
- new mname[][] = {"Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"};
- pod onplayerdisconnec t ovo
- Kod: [Odaberi]
- oplayers--;
- Kod: [Odaberi]
- forward LoadRecord();
- public LoadRecord()
- {
- new strFromFile[24], arrCoords[6][5], File: file = fopen("porecords", io_read);
- if (file)
- {
- fread(file, strFromFile);
- split(strFromFile, arrCoords, ',');
- Precord = strval(arrCoords[0]);
- Drecord = strval(arrCoords[1]);
- Mrecord = strval(arrCoords[2]);
- Yrecord = strval(arrCoords[3]);
- THrecord = strval(arrCoords[4]);
- TMrecord = strval(arrCoords[5]);
- fclose(file);
- }
- return 1;
- }
- forward SaveRecord();
- public SaveRecord()
- {
- new coordsstring[24];
- format(coordsstring, sizeof(coordsstring), "%d,%d,%d,%d,%d,%d", Precord, Drecord, Mrecord, Yrecord, THrecord, TMrecord);
- new File: file = fopen("porecords", io_write);
- fwrite(file, coordsstring);
- fclose(file);
- return 1;
- }
- forward Record(playerid);
- public Record(playerid)
- {
- if(Precord)
- {
- new string[92];
- format(string, sizeof(string), "**rekord igraca %d, sada je narasao %d %s %d, na %d:%d", Precord, Drecord, mname[Mrecord-1], Yrecord, THrecord, TMrecord);
- SendClientMessage(playerid, 0xA5D24DFF, string);
- }
- oplayers++;
- if(Precord < oplayers)
- {
- Precord=oplayers;
- gettime(THrecord, TMrecord); getdate(Yrecord, Mrecord, Drecord);
- new string[92];
- format(string, sizeof(string), "*NOVI REKORD IGRACA %d, stavljen na %d %s %d, at %d:%d", Precord, Drecord, mname[Mrecord-1], Yrecord, THrecord, TMrecord);
- SendClientMessageToAll(0xFCB833FF, string);
- SaveRecord();
- }
- return 1;
- }
- takodje stavis i ovo na kraj skripte
- Kod: [Odaberi]
- forward ConnectedPlayers();
- public ConnectedPlayers()
- {
- new Connected;
- for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && !IsPlayerNPC(i)) Connected++;
- return Connected;
- }
- takodje stavi ovo pod onplayerconnect
- Kod: [Odaberi]
- SetTimerEx("Record", 5000, false, "d", playerid)
- -----------------------------------------------------------------------------------
- TAKO JE BLEAKS URADIO ALI SAD KAKO JA DA DODAM SVOJ TEXTDRAW
- JEL NEMA TU TEXT REKORDO CU SVOJ JA URADIO SVOJ TEXTDRAW
- GDE GDA TREBA DODAT
- -------------------------------------------------------------------------------------
- // Create the textdraws:
- Textdraw0 = TextDrawCreate(487.000000, 394.000000, "00:");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 2);
- TextDrawLetterSize(Textdraw0, 0.380000, 1.000000);
- TextDrawColor(Textdraw0, -1);
- TextDrawSetOutline(Textdraw0, 0);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawSetShadow(Textdraw0, 1);
- Textdraw1 = TextDrawCreate(485.000000, 408.000000, "Rekord");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 2);
- TextDrawLetterSize(Textdraw1, 0.380000, 1.200000);
- TextDrawColor(Textdraw1, -1);
- TextDrawSetOutline(Textdraw1, 0);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawSetShadow(Textdraw1, 1);
- Textdraw2 = TextDrawCreate(610.000000, 395.000000, "00");
- TextDrawBackgroundColor(Textdraw2, 255);
- TextDrawFont(Textdraw2, 2);
- TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
- TextDrawColor(Textdraw2, -1);
- TextDrawSetOutline(Textdraw2, 0);
- TextDrawSetProportional(Textdraw2, 1);
- TextDrawSetShadow(Textdraw2, 1);
- Textdraw3 = TextDrawCreate(613.000000, 410.000000, "Igraci");
- TextDrawBackgroundColor(Textdraw3, 255);
- TextDrawFont(Textdraw3, 2);
- TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetOutline(Textdraw3, 0);
- TextDrawSetProportional(Textdraw3, 1);
- TextDrawSetShadow(Textdraw3, 1);
- ------------------------------------------------
- ako moze dami kazete gde treba ga stavit i dami stavite pliz il gde treba stavit Textdarw0,textdraw,1,23
- pliz
Advertisement
Add Comment
Please, Sign In to add comment