November 08, 2026, 05:31:56 pm

Author Topic: AMX MOD X guide for whoever wants to start scripting  (Read 382 times)

0 Members and 1 Guest are viewing this topic.

Offline TeeKaaY

AMX MOD X guide for whoever wants to start scripting
« on: December 11, 2013, 05:53:36 pm »
Basically I posted this in another community a while back, and I thought of sharing it here for all the noobies who keep asking me that question.

Hello,

I am glad you asked about this . I just have one small correction, it's not AMX, it's actually AMXX, there is a big difference between them.

First before even thinking of starting scripting plugins, i advise you to learn the pawn syntax. What I mean by that is that you understand all the functionality of the pawn scripting language, learning its basics such as variables, loops... etc. If you wish to learn that, please visit this link: http://wiki.alliedmods.net/Introduction_to_Pawn and http://wiki.alliedmods.net/Pawn_Tutorial

After that you might wanna learn how to compile a plugin (this is a stupid suggestion since most people know how, but anyway), because if you code a plugin but you don't know how to compile it, then its not going to work, please visit this link: https://wiki.alliedmods.net/Compiling_Plugins_%28AMX_Mod_X%29

Now you might wanna learn a very brief introduction to AMX MOD X scripting, please visit: http://wiki.alliedmods.net/Intro_to_AMX_Mod_X_Scripting

Cvars are a very importing thing in AMX MOD X plugins. It allows to turn off/on the plugin or any separate functions inside it. You wanna learn that too, check how here: http://wiki.alliedmods.net/Scripting_Cvars_(AMX_Mod_X)

Optimizing your code is crucial. Witch one would you pick if you had two plugins that does the same job but one does it better and/or does more efficiently? I am pretty sure I don't have to answer that. So head on here: https://wiki.alliedmods.net/Optimizing_Plugins_%28AMX_Mod_X_Scripting%29

There are lots of other great wikis in the AMX MOD X scripting wiki page: https://wiki.alliedmods.net/Category:Scripting_%28AMX_Mod_X%29

I also would like to give you this: http://www.amxmodx.org/funcwiki.php?go=all_func (not working anymore, just check the .inc files, it has all the functions you need)
This is a list of all the present functions in AMX MOD X that you can use. These functions allow you to do special things, for example: cs_set_user_deaths() allows you to set a user a specified deaths amount, and so on.

This topic has almost all the tutorials for several things that you might want to do: http://forums.alliedmods.net/showthread.php?t=172936

Just a small note before I end here: don't expect to start making some huge plugins like GunGame or JailBreak in a matter of weeks, but at least you will get there eventually, I hope .
One more thing, when starting as a new coder, I advise to look at other plugins that do a similar job to what you are trying to accomplish, it will make your life easier, and it would be better if you edit other plugins to do what you want them to do instead of starting from scratch, just don't forget to give credits where you have to .

Hope this helped
Requesting this to be stickied? I don't mind actually but I figured that this would help those who wish to go on the same path.
« Last Edit: October 05, 2014, 03:08:40 pm by BuRn »

Suhaib

  • Guest
Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #1 on: December 11, 2013, 05:55:07 pm »
thanks dude!

Offline TeeKaaY

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #2 on: December 11, 2013, 05:57:34 pm »
That was fast O.o

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #3 on: December 11, 2013, 07:01:25 pm »
Tbh I don't see people learning pawn if they don't have previous experience of coding languages. It's nothing too hard, but not the most basic language either.


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline TeeKaaY

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #4 on: December 11, 2013, 07:05:20 pm »
If you think about it its a simplified version of a very basic C language.

Offline tajski

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #5 on: December 11, 2013, 08:55:43 pm »
I'm studing Java and JavaScript. I'll get there soon :D

//ON I haven't read it all but that's good that you've decided to share your experience as well as knowledge :)

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #6 on: December 11, 2013, 09:36:25 pm »
If you think about it its a simplified version of a very basic C language.

I know but what I tried to point out, that due to lack of tutorials for the specific language, it may be difficult for beginners to get into the groove.


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline Dr.Richtofen

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #7 on: December 11, 2013, 09:57:28 pm »
Does it require Binary Code? (Professor Computerssss right here.)



Offline Deathknife

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #8 on: December 11, 2013, 10:07:15 pm »
I recommend you not to waste your time learning this, learn some useful language instead like Java.

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #9 on: December 11, 2013, 10:09:25 pm »
Does it require Binary Code? (Professor Computerssss right here.)

I'm sorry but I doubt you know how coding works, at all.

To answer your question, no it doesn't, well theoretically it does since everything computer processes is in binary code, including user input, however you do not directly write in binary, would take more than numerous human lifetimes to produce programs in binary code. Imagine spacing out all the 0s and 1s. That's why we use computer languages so we don't have to use binary codes. So, to take away the confusion, while basically anything pc related runs through binary code, you can code without any actual binary knowledge with no hassle whatsoever.


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #10 on: December 11, 2013, 10:11:46 pm »
I recommend you not to waste your time learning this, learn some useful language instead like Java.

Depends if you want to program for money in the future or just have programming as a hobby in free time. Whilst java has many more uses, if you're generally not interested in becoming a professional coder, you might as well learn pawn only.


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline Fisu

  • The only time success comes before work is in the dictionary.
  • Unstoppable
  • *****
  • Posts: 6973
  • Total likes: 616
  • :)
Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #11 on: December 11, 2013, 10:22:30 pm »
I've got already problems learning french, but anyway thanks for trieng.. :D

Offline 'PL'

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #12 on: December 11, 2013, 10:43:36 pm »
Good guide.

Offline TeeKaaY

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #13 on: December 11, 2013, 10:50:04 pm »
rawrplus if you have read it, you would notice that there are actually two linked tutorials to pawn.

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #14 on: December 12, 2013, 08:35:07 am »
rawrplus if you have read it, you would notice that there are actually two linked tutorials to pawn.

Mate I did read it. What I'm trying to tell, for example php has phpacademy, thenewboston, w3schools and occupied support forums while pawn has few tutorials from volunteers that's about it. While it may not be an issue for more experienced coders, but once you finish the tutorials and are supposed to do things on your own, it very well may come in handy to posses the ability to simply search your way out of the issue thanks to the knowledge base. Pawn isn't the worst documented language either, but when I was completely clueless about coding I decided to start with pawn and frankly I had some issues with learning it. Only after I learned other a bit more simplified C based languages I felt confident in learning pawn


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline terraboN

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #15 on: December 12, 2013, 08:59:12 am »
rawrplus if you have read it, you would notice that there are actually two linked tutorials to pawn.

Mate I did read it. What I'm trying to tell, for example php has phpacademy, thenewboston, w3schools and occupied support forums while pawn has few tutorials from volunteers that's about it. While it may not be an issue for more experienced coders, but once you finish the tutorials and are supposed to do things on your own, it very well may come in handy to posses the ability to simply search your way out of the issue thanks to the knowledge base. Pawn isn't the worst documented language either, but when I was completely clueless about coding I decided to start with pawn and frankly I had some issues with learning it. Only after I learned other a bit more simplified C based languages I felt confident in learning pawn

So you are telling me that C helps with Pawn?

Also, you know when you recommended the coding route (HTML -> php -> C++ -> Whatever..) Do i have to go through it? I know i don't but will it make the coding easier as i progress from one language to another, if you know what i mean? Also i heard of Python but have no idea what it is used for.. Can someone elaborate on it please?

On topic :

Good guide, quite a few sources to help out beginners, i shall definately be using it in the near future :)

Offline Rawrplus

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #16 on: December 12, 2013, 09:07:22 am »
rawrplus if you have read it, you would notice that there are actually two linked tutorials to pawn.

Mate I did read it. What I'm trying to tell, for example php has phpacademy, thenewboston, w3schools and occupied support forums while pawn has few tutorials from volunteers that's about it. While it may not be an issue for more experienced coders, but once you finish the tutorials and are supposed to do things on your own, it very well may come in handy to posses the ability to simply search your way out of the issue thanks to the knowledge base. Pawn isn't the worst documented language either, but when I was completely clueless about coding I decided to start with pawn and frankly I had some issues with learning it. Only after I learned other a bit more simplified C based languages I felt confident in learning pawn

So you are telling me that C helps with Pawn?

Also, you know when you recommended the coding route (HTML -> php -> C++ -> Whatever..) Do i have to go through it? I know i don't but will it make the coding easier as i progress from one language to another, if you know what i mean? Also i heard of Python but have no idea what it is used for.. Can someone elaborate on it please?

On topic :

Good guide, quite a few sources to help out beginners, i shall definately be using it in the near future :)

PHP / C is enough to vaugely understand what to do in pawn :)

HTML is just arguably easiest coding language and it's a motivation booster. C++ is a biit more enhanced C, but if you want pawn, just learn basics of C instead.
« Last Edit: December 12, 2013, 09:11:29 am by St. Nicholrawrs »


[ 15% ] Finally update Billing Section once and for all
[ 50% ] Ambrosia Garry's Mod Re-Invented
[ 10% ] My web-coding online series
[ 20% ] Brand new forums
[ 30% ] Ambrosia FAQ
[ 10% ] Ambrosia TV
      
           
              [ ► ] Ambrosia History (2009-2014)
              [ ► ] Ambrosia Official Twitter
              [ ► ] Ambrosia Steam Group
              [ ► ] Ambrosia Facebook
              [ ► ] Support Section
              [ ► ] Site RSS
       
             
               [ ► ] Contact me through Steam
               [ ► ] Portfolio (Unfinished)
               [ ► ] Ambrosia Teamspeak
               [ ► ] Send me a PM






[info]I am currently inactive, please contact other highstaff if you need anything[/info]

Offline Dr.Richtofen

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #17 on: December 12, 2013, 04:50:05 pm »
Does it require Binary Code? (Professor Computerssss right here.)

I'm sorry but I doubt you know how coding works, at all.

To answer your question, no it doesn't, well theoretically it does since everything computer processes is in binary code, including user input, however you do not directly write in binary, would take more than numerous human lifetimes to produce programs in binary code. Imagine spacing out all the 0s and 1s. That's why we use computer languages so we don't have to use binary codes. So, to take away the confusion, while basically anything pc related runs through binary code, you can code without any actual binary knowledge with no hassle whatsoever.
Bullseye! *cough* , yeah I'm just starting right now.

Offline TeeKaaY

Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #18 on: December 12, 2013, 05:20:32 pm »
It was easy for me to quickly adapt to the pawn syntax since I already knew C++. But if you look at it from a person that knows nothing about languages it's quite easy to learn it.

Offline Ðεмση ƒŦ Iℓℓusιση

  • Göttlichen Stern
  • Sr Member
  • **
  • Posts: 102
  • Total likes: 0
  • When life gives you lemons! Don't make lemonade!
Re: AMX MOD X guide for whoever wants to start scripting (ehh..)
« Reply #19 on: January 06, 2014, 07:13:56 pm »
I'm currently learning it. I'm a bit familiar with codes and I learn quite fast. Once I get a hold of the syntax and see some AMXX plugins examples I'll be able to make simple plugins.
HUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUEHUE
u w0t m8 ? 1v1 mi irl brah... ill rek ur ass u lil' pice auf shiet...


MOOOO'! MOOOO' NAKED HOES >.<