SA-MP Forums

Go Back   SA-MP Forums > FireCat

Conversation Between FireCat and Jeffry
Showing Visitor Messages 1 to 10 of 16
  1. Jeffry
    27/07/2012 05:54 PM
    Jeffry
    Silly me. +1
    I thought you ment the clock in the right top of the screen.
    This worldtime only supports integers, you can't set it to a dayname.
  2. FireCat
    27/07/2012 05:53 PM
    FireCat
    S
    Silly german :]
  3. Jeffry
    27/07/2012 05:51 PM
    Jeffry
    Oh that. Disable the clock, add a Textdraw there, and set GetDayName as string of the TextDraw.
  4. FireCat
    27/07/2012 05:43 PM
    FireCat
    But SetWorldTime only allows integers >.<
  5. Jeffry
    27/07/2012 05:39 PM
    Jeffry
    pawn Code:
    stock GetDayName()
    {
        new time = gettime() - 1302300000;
        new daycount = 7;
        while(time >= 86400)
        {
            time-=86400; daycount++;
            if(daycount==8) daycount=1;
        }
        new name[11];
        switch(daycount)
        {
            case 1: name = "Monday";
            case 2: name = "Tuesday";
            case 3: name = "Wednesday";
            case 4: name = "Thursday";
            case 5: name = "Friday";
            case 6: name = "Saturday";
            case 7: name = "Sunday";
        }
        return name;
    }

    Should do it.
  6. Jeffry
    26/07/2012 09:32 AM
    Jeffry
    Alright. I will send you a code soon. 1-2 days, very busy these days.
  7. FireCat
    21/07/2012 05:42 PM
    FireCat
    Not a bit
  8. Jeffry
    21/07/2012 05:34 PM
    Jeffry
    Pick the timestamp from any day you know at 00:00:00, and then calculate it to this date always. Take a loop and make always -86400, until you are under this timestamp you picked before, each time you make -86400 you raise another variable with 1, when it is 7, make it 1 again. 1= Monday, 2=Tuesday,... . By this you can calculate a day-name.
    Understood that?
  9. FireCat
    21/07/2012 05:21 PM
    FireCat
    Quick question, how can I set the time on samp client to a string like "Friday"? >.>
  10. Jeffry
    21/07/2012 05:19 PM
    Jeffry
    Too bad. Programming as course sounds interesting too.

All times are GMT. The time now is 03:33 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.