samp.directory
← Skripte und Bibliotheken

mateusware/samp-plugin-template

samp plugin template for VS (.sln)

Plugin★ 0aktualisiert Sept. 2026Keine LizenzC
Auf GitHub öffnen

Dieses Repository hat keine Lizenzdatei. Es ist öffentlich lesbar, aber das allein gibt noch keine Erlaubnis, es weiterzuverwenden.

Im Pawn-Compiler ausprobieren →

Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.

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

Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden

mateusware/samp-plugin-template: SA-MP Plugin | samp.directory