Why this dont work?
#5

Quote:
Originally Posted by (SF)Noobanatior
Посмотреть сообщение
found it try this
pawn Код:
public IncreaseTime(playerid)
{
    new h, m;
    new string[20];
    GetPlayerTimeEx(playerid, h, m);
    TextDrawShowForPlayer(playerid, time);
    m++;
    if(m == 60)
    {
        h++;
        m = 0;
    }
    if(h == 24)
    {
        h = 0;
    }
    SetPlayerTimeEx(playerid, h, m);
    if(m >= 0&&m < 9)
    {
        format(string, sizeof(string), "%d:0%d", h, m);
        TextDrawSetString(time,string);
    }
    else if(m == 9)
    {
        format(string, sizeof(string), "%d:0%d", h, m);
        TextDrawSetString(time,string);
    }
    else if(m >= 10&&m < 60)
    {
        format(string, sizeof(string), "%d:%d", h, m);
        TextDrawSetString(time,string);
    }
    if(h== 1)
    {
        SendClientMessageToAll(COLOR_WHITE,"[GAME TIME] 1:00");
    }
    else if(h== 0)
    {
        SendClientMessageToAll(COLOR_WHITE,"[GAME TIME] 0:00");
    }
    else {
        format(string, sizeof(string), "[GAME TIME] %d:00", h);
        SendClientMessageToAll(COLOR_WHITE, string);
        SetWorldTime(h);
    }
    return h;
}
and you might want to send the message just to the player or will spam your server each hour
Thanks dude. But now its spamming lol
Reply


Messages In This Thread
Why this dont work? - by Admigo - 22.05.2011, 22:29
Re: Why this dont work? - by (SF)Noobanatior - 23.05.2011, 04:39
Re: Why this dont work? - by Admigo - 23.05.2011, 08:03
Re: Why this dont work? - by (SF)Noobanatior - 23.05.2011, 08:49
Re: Why this dont work? - by Admigo - 23.05.2011, 09:10
Re: Why this dont work? - by (SF)Noobanatior - 23.05.2011, 09:27
Re: Why this dont work? - by AlternativeDC - 23.05.2011, 09:50
Re: Why this dont work? - by Admigo - 23.05.2011, 09:51
Re: Why this dont work? - by Admigo - 23.05.2011, 10:21
Re: Why this dont work? - by (SF)Noobanatior - 23.05.2011, 10:37

Forum Jump:


Users browsing this thread: 2 Guest(s)