Random Music
Hello,
I tried to make this code works on every new round but its not working can you tell me what I did wrong? PHP Code:
|
Re: Random Music
g_iCvars = 1 this is not how you set cvar values. By doing this you just wrote "1" to a variable and in the process of doing so lost the actual cvar pointer. To set a cvar you have to use set_pcvar_num/float/string.
|
Re: Random Music
Like this?
PHP Code:
|
Re: Random Music
Sure it doesn't work. HLTV event is a global event, it doesn't pass any "id" parameter. You have to iterate over all players using get_players and a for loop.
|
Re: Random Music
Since you're changing the cvar value on 1 on every connect i think that you may wanted it to be individual, so i added a global bool which you can change if it wasn't your goal.
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 11:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.