View Single Post
DynamicBits
Senior Member
Join Date: Sep 2007
Location: US
Old 11-23-2008 , 14:57   Re: Molotov Cocktail v3.20
Reply With Quote #8

Quote:
Originally Posted by anakin_cstrike View Post
1. As i can see, you don't need csx module
2. You can remove the fun module very easy, using fm_give_item and fm_set_user_frags from fm util.
3.
PHP Code:
if (key == 0) {
        
buy_molotov(id);
    } else if (
key == 1) {
        
client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
    } else {
        
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
->
PHP Code:
switch(key)
    {
        case 
0buy_molotov(id);
        case 
1client_print(idprint_center">You have chosen not to buy a Molotov Coctail<");
        default: 
client_print(idprint_center">You have choosen to exit the molotov menu...<");
    } 
4.
PHP Code:
if(id// something
else 
    
//... 
->
PHP Code:
id /* something */ /* ... */ 
5. Good Job
  1. Agreed. The funny thing is that no matter how many times I looked through all of the code, I never once thought to check that all of the includes were actually required.
  2. Agreed.
  3. Agreed. That's the way I would have written it from scratch.
  4. On this one, I'll have to respectfully disagree. If the lines of code were much shorter, what you suggested would be practical, but the way I have it allows for much better readability.
  5. Thank-you for your suggestions. I have already updated the code in SVN and you can expect to see the changes in version 3.21.

Quote:
Originally Posted by YamiKaitou View Post
The link you posted. Since the forum adds the link to download the compiled copy, there is no need to upload the .amxx. If you want it to be added to the rules, I can arrange that
I think it would benefit everyone if the only available list of rules actually had all of the rules listed. It would probably save you some trouble in the future as well.
DynamicBits is offline