cvars
can i use cvar in a switch func somthnig like this?
switch( num ) { case get_pcvar_num( hello ) .. 100:... also i want to make a cvar for admin flag like ADMIN_BAN possible? |
Re: cvars
Quote:
|
Re: cvars
ok so first thing can i do a cvar for admin flag?
like register_cvar("admin_flag_req", "ADMIN_BAN") or somthing like that second can i use cvar in a switch function? i mean register_cvar("chance", "30") switch( odds ) { case get_pcvar_num of this car can i do it? |
Re: cvars
ADMIN_BAN is an integer. Not a string.
Your better off using switch( random_num( 0, 30 ) ) { Case 0: Etc. |
Re: cvars
no i know but i want to do like win chance in somthing and i want a cvar for it to make it wasy to pick
|
Re: cvars
Why don't you just try it by yourself ?
It doesn't even compile. It must be a constant expression as compiler says. You can't use non-constant variables. |
Re: cvars
so there is no way to to cvar for switch func?
|
Re: cvars
Quote:
|
| All times are GMT -4. The time now is 23:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.