Rewriting my GM -
knackworst - 12.10.2013
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
Re: Rewriting my GM -
PT - 12.10.2013
use YSI is a very good library.
Re: Rewriting my GM - Patrick - 12.10.2013
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
Re: Rewriting my GM - Astralis - 12.10.2013
I recommend you to choose MySQL, nothing is easier than it.
Re: Rewriting my GM -
DanishHaq - 12.10.2013
MySQL, ZCMD, sscanf, y_colors.
Re: Rewriting my GM - Patrick - 12.10.2013
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.
Re: Rewriting my GM -
Konstantinos - 12.10.2013
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..
Re: Rewriting my GM -
knackworst - 12.10.2013
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,...
Re: Rewriting my GM -
Konstantinos - 12.10.2013
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 ..
Re: Rewriting my GM -
knackworst - 12.10.2013
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...