Raised This Month: $ Target: $400
 0% 

[Q] Best practices / Code snippets?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LegacyCode
Member
Join Date: Apr 2017
Old 04-08-2017 , 12:20   [Q] Best practices / Code snippets?
Reply With Quote #1

Hello World,

I used to be a front-end developer and I tried many different languages
and programs (AutoIT, PHP, Python, JavaScript,...), so I'm kinda familiar
with some coding stuff.

I've set up Sublime Text 2 to compile my .sma files easily
(thanks to https://forums.alliedmods.net/showthread.php?t=293376)
and dived into some plugins to look into the code, only to find no comments
for the most part and different takes on certain things,
e.g. hooking SayText to manipulate the chat in certain ways.

Is there some kind of best practices coding snippets database?
Would some of you plugin gods mind to share some of your genius with us?

I hope this isn't too much to ask (and not a duplicate question), but I'm so confused.
I don't want to learn bad habits when coding plugins right off the bat and the API documentation
isn't too helpful sometimes either (https://www.amxmodx.org/api/).

Also it doesn't have to be actual code snippets, although I believe that's what I learn from best.
Looking at existing code I get the grasp of what's happening, but I lack the
details on why and when I should do stuff in certain ways.

- LegacyCode

PS: I'm mainly talking about plugins for CS 1.6, but I would love to see more on this topic obviously

Last edited by LegacyCode; 04-08-2017 at 12:22. Reason: formatting
LegacyCode is offline
 


Thread Tools
Display Modes

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 18:05.


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