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
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.