change variable depending of time hours minutes
I've searched this forum. Found something similar, but it doesn't make me smarter in this case. Please don't post a valid code, just tell me more than compiler does.
I commented lines, where the errors are. Thanks. PHP Code:
|
Re: array must be indexed <variable "hour">
PHP Code:
|
Re: array must be indexed <variable "hour">
PHP Code:
|
Re: array must be indexed <variable "hour">
get_time fills your string (hourString) with the Hour. For your check (hour >= 22....) you need an Intenger (Number). Exolents code basictly converts the String into an Integer so you can use it.
|
Re: array must be indexed <variable "hour">
naah... basically what I'm trying to do is to change cvar value depending on time. so I have for example weapon_lights "1" and it changes 0/1 depending of conditions.
PHP Code:
|
Re: array must be indexed <variable "hour">
For getting hours (and minutes and seconds, if you need) as integer, you can do:
Code:
|
Re: array must be indexed <variable "hour">
Quote:
|
Re: array must be indexed <variable "hour">
Quote:
|
Re: array must be indexed <variable "hour">
You can just use set_cvar_num.
And you can execute that function in every map change. |
Re: array must be indexed <variable "hour">
Quote:
|
| All times are GMT -4. The time now is 00:25. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.