Jump to content

Recommended Posts

Posted

hello

i need to know how must a gamemode writhed for best performance

what is steps of that

also i need to know how i can create includes and do it help to gain better performance?

 

Posted
2 hours ago, sina alex said:

hello

i need to know how must a gamemode writhed for best performance

what is steps of that

also i need to know how i can create includes and do it help to gain better performance?

 

Creating your gamemode divided into modules is generally best practice because you will always find what you need and you don't need to search in a 1 bloated big file.

Performance overall depends on how much better is your code writed. Always improve what is really important and what really affects your server's performance, you can use https://github.com/Zeex/samp-plugin-profiler to profile your code.

  • Upvote 1
Posted

what is best about coding?

write all (funactions,cmds,factions and ..) in one file or do it by one by one via FS

cmd fs

factions fs

jobs fs

additionals fs

????????

Posted

you can do all in your gamemode.pwn, do not use filescripts for what you say. 

if you want to create modules, you have to create .inc file and include intro your .pwn file

  • Like 1
Posted
16 minutes ago, nobilzeus said:

you can do all in your gamemode.pwn, do not use filescripts for what you say. 

if you want to create modules, you have to create .inc file and include intro your .pwn file

then what you say is about to do it all in one game mode?

what i need for create include?

Posted

you can do all in your .pwn 

you dont need modules, you can use it only if you want to find something faster

 

so if you want to use it, just create a .inc file in your pawno/includes

 

ex: create there vars.inc , cmds.inc , colors.inc what you want 

 

after that you go in your gamemode (.pwn) and use 

 

#include <vars>
#include <colors>
 

thats it

  • Upvote 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.