Raised This Month: $32 Target: $400
 8% 

[HELP] Chaning cvars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sekac
Senior Member
Join Date: Nov 2016
Old 01-31-2017 , 17:00   [HELP] Chaning cvars
Reply With Quote #1

I don`t know how to change cvars at certain time, i want to make the shop free at 21:00.
I can do this: amx_task 21:00 "shop_prices 0" t, but after a map change the cvar is back to normal... Any suggestions?
sekac is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 01-31-2017 , 19:41   Re: [HELP] Chaning cvars
Reply With Quote #2

You mean for 1 hour? From 21:00 to 21:59?
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-01-2017 , 07:42   Re: [HELP] Chaning cvars
Reply With Quote #3

Ever heard of a magical file called configs/amxx.cfg, where people usually add their cvars?

PS - that is a command, not a cvar.
__________________

Last edited by OciXCrom; 02-01-2017 at 07:43.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-01-2017 , 07:56   Re: [HELP] Chaning cvars
Reply With Quote #4

Actually cvars to be set and comands to be executed should be put in server.cfg instead. Future AMXX updates may overwrite your amxx.cfg and erase all your settings. Amxx.cfg should only be used to change settings that are already in it, it's made for configuring AMXX's features.
klippy is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-01-2017 , 08:58   Re: [HELP] Chaning cvars
Reply With Quote #5

Yeah, but server.cfg is only executed when the server starts, not when it changes map/restarts, etc. So, a non-stop working server may never execute the later added stuff in server.cfg. On the other hand, amxx.cfg is executed on map change.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 02-01-2017 , 09:32   Re: [HELP] Chaning cvars
Reply With Quote #6

Quote:
Originally Posted by OciXCrom View Post
Yeah, but server.cfg is only executed when the server starts, not when it changes map/restarts, etc.
Last time I checked it does reload when a server change maps.
__________________
gabuch2 is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 02-01-2017 , 09:47   Re: [HELP] Chaning cvars
Reply With Quote #7

game.cfg executes on changelevel. Also you can set mapchangecfgfile.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 02-01-2017 , 11:18   Re: [HELP] Chaning cvars
Reply With Quote #8

Quote:
Originally Posted by Shattered Heart Lynx View Post
Last time I checked it does reload when a server change maps.
Just tested and it doesn't.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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:53.


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