Thread
:
Ideas to make your coding experience easier
View Single Post
Author
Message
^BuGs^
Senior Member
Join Date: May 2007
08-12-2007 , 23:06 Ideas to make your coding experience easier
#
1
I been witnessing lots of people doing the same thing so I compiling a bunch of tips.
Before starting a project:
Decide what you are really going to do. (Game play, administration, fun, etc.)
Decide how you are going to do it.
Make sure you can handle that project.
Be sure that you are using latest versions. (MM:S, SM and API's you use.)
Always make a "To Do" list and a change log to keep your project organized.
Check to see if something your about to code in your script is already being done by another plugin with their API. (Don't reinvent the wheel.)
Reason: Less Memory Usage
Example: Repeated messages that go to all client to tell something (i.e. Type !yourtriggerhere to run me)
Possible Solution: Use the
Ads API
. Allows better control flow of messages. (Shameless plug)
Con: Online compiler will not work.
Your plugin provide functionally that everyone could use... create an API with the needed natives. Bouns... make it so it's optional so you don't force the person using your plugin, also have to use the secondary plugin just so they can disable it once it's running.
Highly recommend using
http://sm.nican132.com/
for fast looking up of function definitions.
Do not
hardcode
values. Use Cvars or a configuration file.
Tell users your project's compatibilities/dependencies. (OS, mod, extensions, plugins, APIs)
Don't wait for a request to put screenshots. You can use
Picasa Web
to organize your screenshots easily.
Do not create your own "
MAX CLIENTS
" define. Use
MAXPLAYERS
. If this is going to be an array, do not forget the "
+ 1
". Client Index start
1
-- not
0
.(Hint for people who want their plugins approved.)
Post your suggestion!
__________________
Sourcemod
Plugin
Author and Plugin Approver
"The correct way is MAXPLAYERS + 1"
I will not take
bugs/new idea reports
over the forums. Please use the
issue list
.
Last edited by ^BuGs^; 08-14-2007 at
09:08
.
^BuGs^
View Public Profile
Send a private message to ^BuGs^
Find More Posts by ^BuGs^