3 Questions :)
#1

Hey,

I'm a newbie in PAWN Scripting and I have three noob questions no one could answer me so far:

- What is the advantage of filterscripts? As far as I know: Filterscripts are the same thing as the normal gamemode..

- Does it make sense to write all teleports into a filterscript instead of the actual gamemode?

- How many lines of code should my gamemode have until the performance lowers?

Thats all
Reply
#2

1. Filterscripts can be loaded an unloaded on the fly and do not force the players to reconnect (in a way) on a restart, like a gamemode requires.
2. No, unless you want to load and unload them on the fly (see above) although that may also be achieved by a global variable in your gamemode. If you want to keep your code clean you can also move parts to included files.
3. Lines do not matter. It's what you're doing in those lines that matters. I can write a 1000 line scripts with 100 fast timers which will have a much lower performance than the average 10k lines gamemode.
Reply
#3

1. So its useless until I wanna create some dynamic stuff? Allright. Understood.
2 and 3: I was worried about the 100 "If" checks in my script for the teleports. So I doesn't matter?
Reply
#4

Quote:
Originally Posted by PerformerFX
Посмотреть сообщение
1. So its useless until I wanna create some dynamic stuff? Allright. Understood.
2 and 3: I was worried about the 100 "If" checks in my script for the teleports. So I doesn't matter?
1. You can create something dynamic without having to have it as a filterscript. It just means you can update the code and re-load it without having to restart the server.
2. Won't make a difference, you just need to know how to optimise your script.
Reply
#5

Quote:

It just means you can update the code and re-load it without having to restart the server.

That is the only advantage? Just this?

Ok. Because I have to restart my server 1 time a day anyway, will I probably won't need this. Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)