Game Time Help
#2

Ok I have this so far, now when it changes the time/textdraw the time goes back to the old time not the new time set
Please help me! i will rep
pawn Код:
CMD:tod(playerid, params[])
{
    new string[128], input1, input2, input3;
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not allowed to use command.");
    if(PlayerInfo[playerid][pAdmin] < 4) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(sscanf(params, "iii", input1, input2, input3)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tod [hour] [min] [sec]");
    if(input1 > 23) return SendClientMessage(playerid, COLOR_GREY, "Hours are between 0 and 23.");
    if(input2 > 60) return SendClientMessage(playerid, COLOR_GREY, "Minutes are between 0 and 60.");
    if(input3 > 60) return SendClientMessage(playerid, COLOR_GREY, "secounds are between 0 and 60.");
    gettime(thour, tmin, tsec);
    thour = input1;
    tmin = input2;
    tsec = input3;
    SetWorldTime(input1);
    //ServerTime=input1 + input2 + input3;
    format(string, sizeof(string), "~r~~r~Game Time: ~w~%d:%d:%d", input1, input2, input3);
    TextDrawSetString(TimeTD, string);
    format(string, sizeof(string), "AdmWarn: %s has set the time to %d:%d:%d.", RPN(playerid), input1, input2, input3);
    SendAdminMessage(COLOR_DARKRED, 1, string);
    return 1;
}
Reply


Messages In This Thread
Game Time Help - by JacobSanchez - 15.02.2014, 12:31
Re: Game Time Help - by JacobSanchez - 15.02.2014, 16:11
Re: Game Time Help - by JacobSanchez - 15.02.2014, 17:28
Re: Game Time Help - by CuervO - 15.02.2014, 17:37
Re: Game Time Help - by JacobSanchez - 15.02.2014, 17:45
Re: Game Time Help - by CuervO - 15.02.2014, 17:57

Forum Jump:


Users browsing this thread: 1 Guest(s)