A query. - 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: A query. (
/showthread.php?tid=616014)
A query. -
DeeadPool - 30.08.2016
I wanted to ask that if it is possible that can we link ( add ) a filterscript to the gamemode, i do not mean copy pasting the filterscript, i just mean that can we just link it with the gamemode as my gamemode is going above 30k lines and it's very messy to handle as the filterscript I am making is 10k+. linking like, "xyz.amx" before GameModeInIt. If it is possible then can someone tell me how to do so?
Re: A query. -
Luis- - 30.08.2016
I tend to separate all my functions.. Having a pawn file for variables, one for handling player accounts etc. Then just linking them onto the main script.
Re: A query. -
DeeadPool - 30.08.2016
Quote:
Originally Posted by Luis-
I tend to separate all my functions.. Having a pawn file for variables, one for handling player accounts etc. Then just linking them onto the main script.
|
Can you tell how do you link it? to your gamemode?
Re: A query. -
AndySedeyn - 30.08.2016
Using the include directive:
PHP код:
#include <name_file.ext> // When you keep files in 'pawno/include'
#include "file_path\name_file.ext" // Self-explanatory
Re: A query. -
Sew_Sumi - 30.08.2016
GrandLarceny does some of this.
It's not the best but it's in there. Mind out how you use the method though, as many use it in semi-flawed ways.
Another thing to look at is the method of "Hooks".
Re: A query. -
DeeadPool - 30.08.2016
I don't get it properly. Like, I have a gamemode named "BFSA" and I want to add my new admin system filterscript to it named, "adminscript" so how to I add the file to my gamemode. NOTE:- I am not saying to copying it, I just want to link my filterscript to my gamemode.
Re: A query. -
Shinja - 30.08.2016
Quote:
Originally Posted by AndySedeyn
Using the include directive:
PHP код:
#include <name_file.ext> // When you keep files in 'pawno/include'
#include "file_path\name_file.ext" // Self-explanatory
|
Ex
PHP код:
#include "filterscripts\adminscript.pwn"
Re: A query. -
DeeadPool - 30.08.2016
Quote:
Originally Posted by Shinja
Ex
PHP код:
#include "filterscripts\adminscript.pwn"
|
Thanks, One thing is that if I script something in my gamemodes and I use this variables of my filterscript, so will it work?
Re: A query. -
Luis- - 30.08.2016
Instead of using filterscripts, just section out your gamemode. Then save the files inside the gamemodes folder.
Re: A query. -
Sew_Sumi - 30.08.2016
If you are using variables to be shared, look into PVars and SVars, they are shared between FS and GMs.