Raised This Month: $51 Target: $400
 12% 

TheTime Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NEXO.
Member
Join Date: May 2016
Location: Pakistan
Old 10-24-2020 , 17:17   TheTime Help
Reply With Quote #1

Hello, can you help me to edit thetime, i edited the voice, but cant edit print, sma is attached,

Thanks.
Attached Files
File Type: sma Get Plugin or Get Source (timeleft.sma - 92 views - 4.8 KB)
NEXO. is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 10-24-2020 , 18:30   Re: TheTime Help
Reply With Quote #2

Explain what is it you cannot edit. We can't read minds.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 10-24-2020 , 19:30   Re: TheTime Help
Reply With Quote #3

Probably because you didn't check the ML file.

PHP Code:
register_dictionary("timeleft.txt"
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
NEXO.
Member
Join Date: May 2016
Location: Pakistan
Old 10-25-2020 , 09:36   Re: TheTime Help
Reply With Quote #4

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

Last edited by NEXO.; 10-25-2020 at 09:38.
NEXO. is offline
Old 10-25-2020, 09:59
OciXCrom
This message has been deleted by OciXCrom.
NEXO.
Member
Join Date: May 2016
Location: Pakistan
Old 10-26-2020 , 18:57   Re: TheTime Help
Reply With Quote #5

anyone can help?
NEXO. is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:48.


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