If you're serious about this plugin, here's some tips:
- Add a version number in your Plugin:myinfo function along with a version cvar (this is so sourcemod.net can track how many servers use your plugin).
- The entire use/point of your "admins" array/variable is completely unnecessary. You can accomplish this by using the RegAdminCmd() function instead of using RegConsoleCmd() with a hard coded admin-check system for the sm_suicidebomb command.
- for your case, use:
PHP Code:
RegAdminCmd("sm_suicidebomb", SuicideBomb, ADMFLAG_RESERVATION, "Blow crap up");
instead of:
PHP Code:
RegConsoleCmd("sm_suicidebomb", SuicideBomb, "Blow crap up");
- Remove the sm_bomb_flag cvar since admins can already do this by overriding commands.
And a pet peeve of mine:
I like it when code syntax is in a simplistic form where a block of code is put into one line when it has 1 statement inside its block similar to line 48, however line 21 is just disgusting and makes it difficult to read.
Overall, the plugin delivers what you advertise, so that's p-cool. These are just some small tweaks/tips that might help you in future plugins.
-Nano
__________________