Feedback request
Hey, did not figure out better place to post this.
I made my first AMX Mod X plugin for my server since I could not find plugin like this and it seems to be working OK, I guess I just wanted feedback that am I doing everything correct, properly and so on. Code:
#include <amxmodx>Code:
case 1:I should also probably check killer / weapon_id variable values too before doing anything, dunno how well AMX Mod X (or Metamod?) handles mistakes like this but I will definately check their values in the future. |
Re: Feedback request
Quote:
PHP Code:
PHP Code:
|
Re: Feedback request
Quote:
Anyhow, a few tips, if I may: You don't want to use such a long switch with so many cases for something as simple as this. Simply create a constant array, something like this, Code:
Check https://wiki.alliedmods.net/CS_Weapons_Information on how to index the array ( 0th element shouldn't be used in this case ) Then simply Code:
Also, you don't need the num_money variable at all in this case, once you define the cur_money, work with it ( You kinda do anyway ) And the most important tip, post this kind of questions in scripting help in the future :D |
Re: Feedback request
Quote:
Quote:
Thanks to both of you |
| All times are GMT -4. The time now is 09:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.