Raised This Month: $51 Target: $400
 12% 

[ANY] Suicide Bomb


Post New Thread Reply   
 
Thread Tools Display Modes
Nanochip
Senior Member
Join Date: Jan 2014
Old 11-23-2015 , 05:43   Re: [ANY] Suicide Bomb
Reply With Quote #11

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"SuicideBombADMFLAG_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
__________________

Last edited by Nanochip; 11-23-2015 at 05:45.
Nanochip is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 11-23-2015 , 11:57   Re: [ANY] Suicide Bomb
Reply With Quote #12

Quote:
Originally Posted by Nanochip View Post
If you're serious about this plugin, here's some tips:...
Thanks for the tips and stuff. I had that admin array because I wanted to include the flag cvar, but I forgot that overrides exist. And sometimes I just stuff a bunch of code into one line because I don't like having excessively long functions such as OnPluginStart(). I wasn't really writing the code with other coders in mind; I was writing it to work and be understood by me. I also don't care too much about knowing how many servers use my plugin. Sorry if this comes off as obstinate, but I'm explaining why I did what I did.

Last edited by thecount; 11-23-2015 at 12:03.
thecount is offline
jally0411
Junior Member
Join Date: Jan 2017
Old 02-05-2017 , 09:17   Re: [ANY] Suicide Bomb
Reply With Quote #13

sm_suicidebomb Instructions should be how Can make Everyone to use?

sm_suicidebomb only root/admin Of the players can use Only

How to modify??

photo:https://drive.google.com/file/d/0B--...1WRkYxXzA/view

How to modify?

Last edited by jally0411; 02-05-2017 at 10:02.
jally0411 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 02-05-2017 , 14:43   Re: [ANY] Suicide Bomb
Reply With Quote #14

Use can use command overrides in the sourcemod configs
Mitchell is offline
p6oy
Junior Member
Join Date: Jan 2023
Old 02-17-2023 , 04:22   Re: [ANY] Suicide Bomb
Reply With Quote #15

something wrong, only admin can suicidebomb, others cant
p6oy is offline
p6oy
Junior Member
Join Date: Jan 2023
Old 02-17-2023 , 04:25   Re: [ANY] Suicide Bomb
Reply With Quote #16

bro do u fix this problem?
p6oy is offline
Grey83
Veteran Member
Join Date: Dec 2014
Location: Ukraine
Old 02-17-2023 , 13:24   Re: [ANY] Suicide Bomb
Reply With Quote #17

Quote:
Originally Posted by p6oy View Post
something wrong, only admin can suicidebomb, others cant
Quote:
Originally Posted by thecount View Post
ConVars:
  • sm_bomb_flag "a" Flag string for exploding
__________________
Grey83 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode