Rewriting my GM
#1

Hello everyone

I'm rewriting my GM to save some space, to make it faster, to reduce bugs...
Just to make it better...

So I was wondering, do you have any tips?
Like bundeling all the commands in an include, what thing to rewrite first etc...

I know this is kinda vage, but I hope you have some advice

Thanks in advance
Reply
#2

use YSI is a very good library.
Reply
#3

TIP: YSI Libraries, I prefer you to use y_timers and y_iterate(simply known as foreach) instead of SetTimerEx/SetTimer and for(new i = 0; i < MAX_PLAYERS; i++)

Saving System: Either choose on of these saving system. MySQL, Y_INI or SQLite (Your choice)

Streamer: Either RyDeR`s Object Streamer [v0.1b] or Incognito Streamer Plugin I recommend using Incognito Streamer for more stuff, Ryder's one are only for objects

sscanf: sscanf 2.8.1
Command Processor ZCMD or YCMD

Reply
#4

I recommend you to choose MySQL, nothing is easier than it.
Reply
#5

MySQL, ZCMD, sscanf, y_colors.
Reply
#6

Quote:
Originally Posted by Neonman
Посмотреть сообщение
I recommend you to choose MySQL, nothing is easier than it.
To be honest, MySQL and SQLite, is almost the same, like how you code and stuff.
Reply
#7

MySQL, ZCMD/y_commands and sscanf, foreach.

When you use strings, it's better to count the characters like I do. For example for a small countdown, some people use size of 128/256 (which is waste). If it's 3..2..1..Go!, that's size of 2 with NULL. Bit-Flags are also nice!

Having many else if checks for values is slow, switch is faster.

Using char with booleans or even with values between 0-255. Or Bi
Quote:
Originally Posted by pds2012
Посмотреть сообщение
To be honest, MySQL and SQLite, is almost the same, like how you code and stuff.
They are same on the clauses because they're both structured query languages; however, MySQL is faster and it can handle more data etc..
Reply
#8

Thanks people, didn't expect this much reaction
And how about the order of making things?

Like first all the commands, then class selection then race,...
Reply
#9

In my opinion, that depends on everyone's style. I like them to be organised.

pawn Код:
#include ..

#define ..

global variables ..

main ..

callbacks ..

custom callbacks by timers etc ..

commands ..

custom functions ..
Reply
#10

Yes, but I mean something else, anyways, nvm

EDIT: btw why would you do: PInfo[ playerid ][ OnlineTime ] instead of PInfo[playerid][OnlineTime]?
I see many using the first method, I don't really get why...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)