Survival Frags
1 Attachment(s)
Survival Frags Version 0.3 | Counter-Strike 1.6 Description When either team wins the round, all of the alive players are awarded an extra Survival Frag.Cvars amx_sf - Allows admins to enable or disable Survival Frags.Changelog Version 0.1 Extra Notes: Open to suggestions, coding optimizations and comments. |
Re: Survival Frags
Just so you know, you can add an integer to a float, this way you can use get_pcvar_num for the frag amount to add, and then use %d in the chat print.
This way you won't have that amxx bug that prints "1." when you use %.0f. The bug has been pre-corrected in the svn but it's not released yet. |
Re: Survival Frags
PHP Code:
or for simplicity you could just: PHP Code:
|
Re: Survival Frags
Quote:
|
Re: Survival Frags
Uploaded Version 0.2!
|
Re: Survival Frags
I was just saying that :
pFrags += 1.0 does the same thing as pFrags += 1 |
Re: Survival Frags
- catchTeamWin() : You use is_user_alive() in the loop when you have already a list of alive player.
- applyFrags() : Not a big deal, pKills is used only one time, you could use directly the cvar without creating a var. - If I remember frag is not updated right away on the scoreboard, you may want to update with ScoreInfo event. - You should use get_user_frags/set_user_frags(), no need to work with pev_ and float and you could use directly the cvar. |
Re: Survival Frags
Uploaded Version 0.3!
Arkshine, see the changelog for fixes and updates. Also, I didn't update with ScoreInfo event because the engine updates the players score two seconds before the new round starts, so I don't see any need to add ScoreInfo. I use 'pevs' because I tried with set_user_frags( ) and get_user_frags( ) and it would never correctly add the extra frag. |
Re: Survival Frags
A rly simple plugin but original idea... i like it, good job.
|
Re: Survival Frags
Thank you.
|
All times are GMT -4. The time now is 12:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.