New Plugin Help
Hey there,
I want to know that how to make a cvar that will be changed according admin settings. For example If we would like to display some text on screen using show_hudmessage, Then we set a value for display time,But how to change it using cvar so anybody who does't know how to edit .sma file would easily change that thing using cvars,Also tell me how to register that cvar,Thanks.... |
Re: New Plugin Help
http://www.amxmodx.org/funcwiki.php?go=func&id=1062
same shit as always, you just call it differently. You put the info in quotes. |
Re: New Plugin Help
Quote:
|
Re: New Plugin Help
register the CVAR
Code:
new SPS_pcvarQuote:
Code:
new stupidString[255]Quote:
Now...i don't usually answer so many remedial questions so nicely. So, in the future, make sure you read the documentation and wiki before you ask things that you should already know before you start scripting. http://www.amxmodx.org/doc/index.htm...g%2Fprimer.htm http://www.amxmodx.org/funcwiki.php?go=module&id=1 read them, love them, fap to them. |
Re: New Plugin Help
You'll notice that he actually asked for the CVar to control the message timer.
Use a CVar pointer ... combine this into your plugin: Code:
|
Re: New Plugin Help
OH! I thought he wanted to change the string, not the time.
I was really tired. The problem with that is i don't believe that will change on the fly. You'd need to re-call the set_hudmesage function with the new value. Depending on how you have it set up, i'd put it in a task that grabs the cvar with each iteration. Show some code and i would be able to help you better. -OR- This is just a theory....you could hook amx_cvar (the admin command used to change a CVAR in game) and have that command refresh the set_hudmessage after the CVAR has been applied. But i'm not sure how that would work.... |
| All times are GMT -4. The time now is 06:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.