![]() |
reading variables in scripts?
is it possible to parse variables in cfg-scripts?
f.e. set variable1 "test" and then echo $test i know this doesnt work, but is there any other way? If its not possible, then how do i program it for client-side purposes? what kind of file (tiki) and how is it loaded at startup? Thanks! |
are you a programmer ? my not, but what your're typing there is PHP, not C++ or some other gaming programming langues oOo: swordfight:
|
echo and set are moh-console commands.........
|
Example 1:
[code:ef483]// Let's say current yaw-speed is 600 // $VAR will be 600 now set VAR "cl_yawspeed" // F5 sets yaw-speed to 8000 bind F5 "set cl_yawspeed 8000" // F6 puts it back to 600 bind F6 "set cl_yawspeed $VAR"[/code:ef483] Example 2: [code:ef483]// Let's say current yaw-speed is 600 // $VAR will be 600 now set VAR "cl_yawspeed" // wazaa1 sets yaw-speed to 8000 and spins to right alias wazaa1 "set cl_yawspeed 8000; +right" // wazaa1 stops spinning and puts the yaw-speed back to 600 alias wazaa2 "-right; set cl_yawspeed $VAR" // starts spinning and binds F5 to off (to stop spinning) alias on "wazaa1; bind F5 off" // stops spinning and binds F5 to on (to start spinning again) alias off "wazaa2; bind F5 on" // F5 will run the "on" commands bind F5 "on"[/code:ef483] Hope this helps evil: |
All times are GMT -6. The time now is 11:55 AM. |
Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.