Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
Hello, i was feeling to divide the gamemode i made in modules, its around 1.5k lines for now, from scratch, and i'm working on it and want to finish it, it requires long coding, so i was thinking to make it fully modular.
I want to divide the coding among different pwns that will be placed in INCLUDES folder of PAWNO..
But when i do, either the command doesn't work or it shows some error while compiling..
#include "filename.pwn" is the method i use..
I made a simple command kill and it didn't work..
Posts: 171
Threads: 5
Joined: Apr 2018
Quote:
Originally Posted by taktaz
This is not a common idea , You can also use FilterScripts to do that...
Also you can control them when you are admin (rcon logined) with "/rcon loadfs FILTERSCRIPT_NAME" and "/rcon unloadfs FILTERSCRIPT_NAME" example: /rcon loadfs minigame_01
|
No,that's a bad idea.
@OP: It's called modular,you may want to use y_hooks.
and,It's easy. You should look at some gamemodes in here for your example.
What's the error?
Posts: 484
Threads: 189
Joined: Jun 2016
Reputation:
0
Why people work with modules ? I't just a spare of time but memory is the same.
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
I'm working on my first gamemode, so i doubt the gamemode is going to be very less optimized and eat up alot of RAM and CPU..
Maybe i'll drop the plan and work on another..
And I couldn't get your point, look at other languages, don't really know what it has to do with PAWN.
I'm a rookie, just scripting everyday and making 10 threads in the scripting help section at a time, don't really have a deep knowledge, but I'm sure i can get good at it if I try. Thanks for sparing your valuable time and guiding me, Southclaw.
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
I could have divided it in different filterscripts, but it would come up with an error or timewaste at the end when I'll work on /STATS command, either i'll have to gather the information from MySQL, writing cache_get_content_int, else, all I can do is write it in a single gamemode or in the form of INCLUDES.
and @******, it doesn't always make it simple, I feel like you haven't checked California Cops and Robbers gamemode, it contains many features, but if you make a change, something else will get bugged, and it's divided into multiple INCLUDES in the form of .pwn files, which are included in the gamemode.
DISCLAIMER: I'm not insulting him or dishonouring his work, he has added alot of features in it, even I love those features.
Posts: 218
Threads: 50
Joined: Dec 2017
Reputation:
0
As i told it's going to be a CnR gamemode, with a very few maps(hardly 450 objects as a grand total, dynamic ones) in the beginning, but later i would implement some maps as if demanded by the donors. The server is going to be a for a long term.. but I hope sa-mp retains the players back it lost..