samp.directory
← Betikler ve kütüphaneler

mateusware/samp-plugin-template

samp plugin template for VS (.sln)

Plugin★ 0Eyl 2026 güncellendiLisans yokC
GitHub’da aç

Bu deponun lisans dosyası yok. Okumak için herkese açık, ama bu tek başına yeniden kullanma izni vermez.

README.md

samp-plugin-template

samp plugin template for VS (.sln).

template.inc

This file is responsible for telling the server which functions were added using the include.


1. define

#if defined _𝙔𝙊𝙐𝙍𝙄𝙉𝘾𝙇𝙐𝘿𝙀_included
    #endinput
#endif
#define _𝙔𝙊𝙐𝙍𝙄𝙉𝘾𝙇𝙐𝘿𝙀_included

Well, this is just a definition, that is, as the name itself says, it's a DEFINITION. It doesn't add or subtract anything important from your code. However, its use may be useful in the future, since by clarifying to the compiler that your include is included, it's possible to know if it's present in the code or not.

Example:

#if !defined _TEMPLATE_PLUGIN_included
    #error To use "native HelloWorld()" you need to use "template.inc"
#endif

There are several ways to declare this; there is no standard. Let's use some examples of includes:

a_samp.inc
#if defined _samp_included
	#endinput
#endif
#define _samp_included
PawnPlus.inc
#if defined _inc_PawnPlus
#undef _inc_PawnPlus
#endif

#if defined _PawnPlus_included
#endinput
#endif
#define _PawnPlus_included

2. native

Native functions are provided by the SA-MP server itself or by external plugins. Native functions are provided by the SA-MP server itself or by external plugins. In other words: if you create a function for a plugin, you need to explain to the server that you wrote it and that the function exists... and you explain this to the server using:

main.inc

⚠️ Documentation for the "main.cpp" and "main.h" files

template.inc

native HelloWorld();

pluginplugin-samp-templatesa-mpsamp

Bu sayfa GitHub’ın depo hakkında yayımladıklarından oluşturulur. samp.directory kodu barındırmaz. Bu ilanla ilgili bir sorun bildir