A query.
#1

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?
Reply
#2

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.
Reply
#3

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?
Reply
#4

Using the include directive:
PHP код:
#include <name_file.ext> // When you keep files in 'pawno/include'
#include "file_path\name_file.ext" // Self-explanatory 
Reply
#5

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".
Reply
#6

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.
Reply
#7

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" 
Reply
#8

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?
Reply
#9

Instead of using filterscripts, just section out your gamemode. Then save the files inside the gamemodes folder.
Reply
#10

If you are using variables to be shared, look into PVars and SVars, they are shared between FS and GMs.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)