#Mutual scoring sourcmode plugins codeWhen SourceMod loads your plugin, it inspects these bits of code and substitutes it's own internal functions instead. The compiler understands that and generates a special code that says that this function call is going outside. So how does your SourcePawn code and SM core link together if the compiler doesn't know about the existence of the latter? SourceMod include files are written specially, so they say that the implementation of functions is somewhere else. You will notice, however, that there's not much code in there, certainly not enough to implement all the great features of SourceMod, so where are they? They are implemented inside a SourceMod core which is written in C++ and is compiled into binary files which end up in bin directory. The files are plain-text and you are encouraged to read them. Those are SourceMod include files that describe various functions, tags and other features available for SourceMod plugins. You can open it right now and see a lot of inc files there. Angle brackets tell the compiler to look in the default include directory. How does this work? First of all, note that we enclosed file name into angle brackets. It tells the compiler to "paste" the code from another file into yours. But since we are writing a SourceMod plugin, it is a good idea to enable access to SourceMod features first. This is done deliberately so it is possible to use SourcePawn outside of SourceMod. When you have an empty file you can just start writing code using the core language, however, you will not be able to use any of SourceMod features because the compiler does not know about them. Open your favorite text editor and create a new empty file. 11.10 Will SourceMod support Source 2? Will plugins for existing games continue to work if they are ported?.11.9 Why am I seeing references to STEAM_ID_STOP_IGNORING_RETVALS?.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |