← back to blog

Best Practices to Learn SourcePawn

Sat Nov 26 2022

Cover image for Best Practices to Learn SourcePawn

SourcePawn code as seen in Visual Studio Code (image from the SourcePawn VSC extension website)

SourcePawn is a scripting language used to create plugins for the SourceMod platform. I will share with you some practices you can follow to learn the language, which I've refined over time, based on my experience.


Before any tutorial or guide, I find crucial giving these official resources a good read whenever necessary:

In terms of video tutorials, I can recommend 2 YouTube channels:


This channel is the most complete in terms of content, but unfortunately every video is taught with old syntax. I believe it could be used to learn the fundamentals, and you can worry about updating your syntax later on.


Although this channel isn't as complete as the first one, I believe it's worth pointing out as it contains plenty of info about the basics of SourceMod development (with newer syntax).

As of written guides? I find nosoop's guide and Silvers' SourcePawn scripting guide to be very helpful resources.

Learning from others

A general good advice to enhance your SourcePawn knowledge involves acquiring the habit of looking up plugins of other people and learning from their source code. Whether you need inspiration to name your variables, solve a specific problem, or you just need some guidance on how to properly structure a plugin, I believe it's important to keep this strategy in mind.

Course of action

I'm confident this advice applies generally to any skill you're trying to incorporate, and it is actually practicing with the language.

Video tutorials, articles and advice can only get you so far - don't get too comfortable in the tutorial zone, go grab your favorite text editor and start actually practicing with small concepts, like creating your first variables and displaying them in the chat, registering a command, compiling your first plugin, installing it and loading it, etc.

Participating in the community

Another practice that can get you very far is being able to communicate your doubts and issues with other programmers, so they can help you out. The most common places to get help regarding SourceMod are the AlliedModders Discord guild, and the forum.

Being able to efficiently ask questions, provide the correct information and show that you're willing to put effort into solving your problem is an extremely valuable ability, and will get people to happily help you get unstuck. Here are some tips from my part to get to ask for help properly:

  • Don't ask to ask! Just ask your question right away.
  • Be careful not to fall into the XY Problem. Always try to keep in your mind the bigger picture of your situation to avoid unnecessary comes and goes between you and the people that are trying to help you.

Final thoughts

All of the practices described above are meant to serve as an orientation of what the ideal learning path should be. While ones may work better for you than others, I strongly believe diversifying your learning techniques is an amazing way of getting better knowledge of any discipline, not just coding.

This post has strong influences from SourceMod core developer Headline's how to learn to program blog post, which talks about extremely interesting concepts you definitely need to check out.