12.07.2018, 18:13
Umm so is this better
or
pawn Код:
new x;
new z;
new a;
new b;
new c;
...
pawn Код:
new x,
z,
a,
b,
c;
new x;
new z;
new a;
new b;
new c;
...
new x,
z,
a,
b,
c;
Then neither. And if you think that is what you need to worry about in code, you don't understand optimisations at all.
|
new PlayerCash[MAX_PLAYERS];
if(PlayerCash[0] == 0)
{
SendClientMessage(0, -1, "Ha Ha, you're poor.");
}
Calm down, you didn't at one point.
and no @IdonTmiss that's the exact same thing, just more neat in a way. If you want to use less variables you can use arrays, i.e. PHP код:
This means that you can do something like this. PHP код:
Very basic but you get the idea. This also does not improve optimisation, again it's just neater. Variables have such a tiny tiny impact on the server, you shouldn't worry about the amount of variables you're using tbh. |