How can i disable it?
#1

Hi all.

When i type "/Time" i see this:


(if u dont see the image see this link: "https://imgur.com/W6NsODN")

How can i disable it?
Reply
#2

Assuming you're just talking about the text in the corner, remove the "GameTextForPlayer" line in the command (along with any strings that were used to display the text, if you no longer want to use that text).
Reply
#3

this is my code:

PHP код:
CMD:time(playerid,params[])
{
    new 
input_time;
    if (
sscanf(params"i"input_time))
    {
        return 
ShowPlayerDialog(playerid,DIALOG_TIME,DIALOG_STYLE_LIST,"{00FF00}Time","0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23","Ok","Cancel");
    }
    else
    {
        if(
input_time 23 || input_time 0) return GameTextForPlayer(playerid,"~g~Time ~w~(0 - 23)",5000,3);
        
SetPlayerTime(playerid,input_time,0);
        
SendClientMessage(playerid,green,"Time changed");
        
time[playerid] = input_time;
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by Boarden
Посмотреть сообщение
Assuming you're just talking about the text in the corner, remove the "GameTextForPlayer" line in the command (along with any strings that were used to display the text, if you no longer want to use that text).
Check his screen, it shows 17:6 which is not a correct time format (12/24 hours).

@OP, try this:

pawn Код:
CMD:time(playerid, params[])
{
    new string[128], hour, minute, seconds;

    gettime(hour, minute, seconds);
   
    format(string, sizeof(string), "~g~|~w~%02d:%02d~g~|", hour, minute);

    GameTextForPlayer(playerid, string, 2000, 1);
    return 1;
}
And edit it according to your time command.
Reply
#5

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
Check his screen, it shows 17:6 which is not a correct time format (12/24 hours).
I saw that however, asking to "disable it" doesn't exactly make it clear that he wants the code fixing and not outright removed. Regardless the above code seems like it would work.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)