AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   TheTime Help (https://forums.alliedmods.net/showthread.php?t=328057)

NEXO. 10-24-2020 17:17

TheTime Help
 
1 Attachment(s)
Hello, can you help me to edit thetime, i edited the voice, but cant edit print, sma is attached,

Thanks.

OciXCrom 10-24-2020 18:30

Re: TheTime Help
 
Explain what is it you cannot edit. We can't read minds.

Napoleon_be 10-24-2020 19:30

Re: TheTime Help
 
Probably because you didn't check the ML file.

PHP Code:

register_dictionary("timeleft.txt"


NEXO. 10-25-2020 09:36

Re: TheTime Help
 
Quote:

public sayTheTime(id)
{
if (get_cvar_num("amx_time_voice"))
{
new mhours[6], mmins[6], whours[32], wmins[32], wpm[6]

get_time("%H", mhours, 5) + 1
get_time("%M", mmins, 5)

new mins = str_to_num(mmins)
new hrs = str_to_num(mhours) + 1

if (mins)
num_to_word(mins, wmins, 31)
else
wmins[0] = 0

if (hrs < 12)
wpm = "am "
else
{
if (hrs > 12) hrs -= 12
wpm = "pm "
}

if (hrs)
num_to_word(hrs, whours, 31)
else
whours = "twelve "

client_cmd(id, "spk ^"fvox/time_is_now %s_period %s%s^"", whours, wmins, wpm)
}

new ctime[64]

get_time("%m/%d/%Y - %H:%M:%S", ctime, 63)
client_print(0, print_chat, "%L: %s", LANG_PLAYER, "THE_TIME", ctime)

return PLUGIN_CONTINUE
}
i edited

Quote:

get_time("%H", mhours, 5) + 1
get_time("%M", mmins, 5)

new mins = str_to_num(mmins)
new hrs = str_to_num(mhours) + 1
and added + 1, it resulted in changing voice that speak what time is now,

and i want to know how to edit client_print,
Quote:

get_time("%m/%d/%Y - %H:%M:%S", ctime, 63)
client_print(0, print_chat, "%L: %s", LANG_PLAYER, "THE_TIME", ctime)
so that it show +1 also, like original thetime was 16, i added + 1, so the voice is speaking 17, but the client print is showing 16

NEXO. 10-26-2020 18:57

Re: TheTime Help
 
anyone can help?


All times are GMT -4. The time now is 13:51.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.