Get cvar value and set it to other cvar value + number
OK, very short:
What I need to do is to get two client's (or server) cvar values (A and B) and set cvar A to: cvar B + a number. This must be possible in some kind of way! :| |
Re: Get cvar value and set it to other cvar value + number
Server CVARs:
PHP Code:
|
Re: Get cvar value and set it to other cvar value + number
Check if the cvars are server-side or not ( get_cvar_pointer() will fail if server cvar does not exists )
|
Re: Get cvar value and set it to other cvar value + number
How would I do for the client cmd's then? That's the most important thing..
|
Re: Get cvar value and set it to other cvar value + number
I do believe you mean "client cvars"...
Read this Also I would like to make some clarifications regarding my previos post: If the cvar is NOT server-side then it may or may not be client-side. Having said this you would have to make sure that the cvar you're testing exists either server or client-side. |
Re: Get cvar value and set it to other cvar value + number
I know! Already read that, the point is to get some cvar and add a number to it and set another cvar to the other with the number (hard to read, that's why I used A & B as examples on first post)
|
Re: Get cvar value and set it to other cvar value + number
1. Get cvar values
2. If cvar to set is server-side then do a set_pcvar_*() - this would work because get_cvar_pointer did not fail. If the cvar is client-side then do a client_cmd( id, "%s %X", cvar_name, new_cvar_value ) |
| All times are GMT -4. The time now is 01:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.