Help me with 1 code
#4

here's my time code:
pawn Код:
new hour, minute;

stock UpdateWorldWeather()
{
    new next_weather_prob = random(100);
    if(next_weather_prob < 70)      SetWeather(fine_weather_ids[random(sizeof(fine_weather_ids))]);
    else if(next_weather_prob < 95) SetWeather(foggy_weather_ids[random(sizeof(foggy_weather_ids))]);
    else                            SetWeather(wet_weather_ids[random(sizeof(wet_weather_ids))]);
}

public UpdateTimeAndWeather()
{
    gettime(hour, minute);

    format(timestr,32,"%02d:%02d",hour,minute);
    TextDrawSetString(txtTimeDisp,timestr);
    SetWorldTime(hour);

        new x=0;
    while(x!=MAX_PLAYERS) {
        if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
            SetPlayerTime(x,hour,minute);
         }
         x++;
    }
}
Reply


Messages In This Thread
Help me with 1 code - by MrTinder - 30.03.2013, 13:13
Re: Help me with 1 code - by MrTinder - 30.03.2013, 14:18
Re: Help me with 1 code - by RajatPawar - 30.03.2013, 14:23
Re: Help me with 1 code - by MrTinder - 30.03.2013, 14:24

Forum Jump:


Users browsing this thread: 1 Guest(s)