get_user_frags, read_argv
Hi,
I would like my plugin to read get_user_frags(id) and use it to set_user_deaths. It suppose to swap frags with deaths. I tried to work it out from this plugin but I just can't use read_argv PHP Code:
|
Re: get_user_frags, read_argv
PHP Code:
PHP Code:
|
Re: get_user_frags, read_argv
The best way for me to learn is to compare one plugin with another.
But as long as you understand this code, could you comment lines which does what? It would be really easier for me to see how it works. |
Re: get_user_frags, read_argv
PHP Code:
I need to save the number of frags before I start case 12. Anyone wants to help? |
Re: get_user_frags, read_argv
PHP Code:
|
Re: get_user_frags, read_argv
Yes what akcaliberg made is the correct way. The way you have done it like so
PHP Code:
But in contrast to the way akcaliberg did, you save the amount of deaths, and then change it. And when you want to change the amount of frags, you use the saved value in the variable 'temp', and all goes well. |
Re: get_user_frags, read_argv
Quote:
|
Re: get_user_frags, read_argv
Little fix to make things better :
Yu have to use cs_set_user_deaths AFTER set_user_frags, because only cs_set_user_deaths is updating scoreboard, so if you send cs_set_user_deaths first, you gonna see a wrong value (same deaths as frags) even if frags gonna be changed right after. PHP Code:
|
Re: get_user_frags, read_argv
it's good to know :D thanks connor.
|
| All times are GMT -4. The time now is 15:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.