How to set-up an include server. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to set-up an include server. (
/showthread.php?tid=650808)
How to set-up an include server. -
Serenity96 - 07.03.2018
Hello, I would like to know how to install a gamemode.pnw to read the included commands. I want to make a gamemode on include. I want the .pwn file to contain only #include from the game like #include <a_samp> # the definitions it needs, after compiling the .pwn extension to compile all the gamemode on include (.inc).
Something like this:
https://i.imgur.com/xGs7QUK.png
after I have no idea how to make a include include reading from the \ pawn \ include \ myserver folder.
And how to do when compiling the .pwn to compile all of them include the \ pawn \ include \ myserver
I knew the code was something like that: #include <.... myserver \ x> but I do not know exactly how it was supposed to. If you have any idea, I owe it!
PHP код:
#include <a_samp>
#define SERVER_VERSION "RPG - BETA 1.00"
main() print("Script loaded" / myserver" SERVER_VERSION);
#include ....\myserver\x
I just remember that in the .pwn extension you found just that. But I'm not sure that I wrote correctly to get my grocery store where I needed it
Re: How to set-up an include server. -
PepsiCola23 - 07.03.2018
Why dont you create the systems as includes,place them in pawno includes and then simply use #include x
And compile gm?
Re: How to set-up an include server. -
Serenity96 - 07.03.2018
Quote:
Originally Posted by PepsiCola23
Why dont you create the systems as includes,place them in pawno includes and then simply use #include x
And compile gm?
|
I know what you say, I thought about it, but I want to make a gamemode YCMD / YSI after this model:
https://imgur.com/a/nv5Pi
And those files a_includes.inc and a_main.inc contain 2 codes that when compiling .pwn
Compile all the .inc systems that you have or are already in gamemodes. And I do not know what code to write in a_includes.inc and a_main.inc to compile everything to me.
Re: How to set-up an include server. -
Serenity96 - 07.03.2018
Quote:
Originally Posted by [HLF]Southclaw
First of all, avoid writing your gamemode code in `pawno/include` - this directory is for libraries, external packages of code. It would get confusing when explaining this when asking for help as it's not a standard thing to do. Keep your gamemode code in the `gamemodes/` folder.
For an example of a modular gamemode, check out this: https://github.com/Southclaws/Scaven...rvive.pwn#L424 (I linked to an include example).
Here, I'm using `#include "filepath.extension"` not `#include <filename>` and the path between the " character refers to the relative path from the `gamemodes/` directory. Check this for an example: https://github.com/Southclaws/Scaven...ster/gamemodes
|
I know what you say, I thought about it, but I want to make a gamemode YCMD / YSI after this model:
https://imgur.com/a/nv5Pi
And those files a_includes.inc and a_main.inc contain 2 codes that when compiling .pwn
Compile all the .inc systems that you have or are already in gamemodes. And I do not know what code to write in a_includes.inc and a_main.inc to compile everything to me.