Saving time/weather with dini
#5

Here you go, sorry btw, I'm not using zcmd I have so much troubles with it idk why.

pawn Код:
//------------------------------Set time----------------------------------------


 if(strcmp(cmdtext, "/asettime") == 0)
  {
        tmp = strtok(cmdtext, idx);
        new time = strval(tmp);
        if(logged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be logged in to use that command!");
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] < 1)
    {
    SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not admin.");
    return 1;
    }
     if(!strlen(tmp))
    {
     SendClientMessage(playerid, COLOR_LIGHTBLUE, "USAGE: /asettime [hour]");
      return 1;
          }
      if(time < 0 || time > 23)
      {
        SendClientMessage(playerid, COLOR_BRIGHTRED, "Time must be between 0 and 23 hours!");
        return 1;
      }
      else if(logged[playerid] == 1)
      {
      SetWorldTime(time);
      format(string, sizeof(string), "Time has been changed for %d hour(s).", time);
      SendClientMessage(giveplayerid, COLOR_ORANGE, string);
      }
        return 1;
  }
Reply


Messages In This Thread
Saving time/weather with dini - by Adamsy - 18.08.2016, 19:11
Re: Saving time/weather with dini - by MEW273 - 19.08.2016, 01:17
Re: Saving time/weather with dini - by Adamsy - 19.08.2016, 02:19
Re: Saving time/weather with dini - by MEW273 - 19.08.2016, 02:39
Re: Saving time/weather with dini - by Adamsy - 19.08.2016, 02:59
Re: Saving time/weather with dini - by SoFahim - 19.08.2016, 04:29
Re: Saving time/weather with dini - by Adamsy - 19.08.2016, 22:22
Re: Saving time/weather with dini - by Adamsy - 20.08.2016, 02:24

Forum Jump:


Users browsing this thread: 1 Guest(s)