17.05.2015, 17:11
Hello,
Well I know script, create some functions, but I have a question about it.
is better to script like this:
or like this:
I started to optimize my gamemode so I asking will this help (to reduce memory useage and so on) or won't help?
Well I know script, create some functions, but I have a question about it.
is better to script like this:
Код:
///////1st example
new Msg[128];
function1()
{
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}
function2()
{
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}
function3()
{
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}
Код:
///////2nd example
function1()
{
new Msg[128];
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}
function2()
{
new Msg[128];
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}
function3()
{
new Msg[128];
format(Msg, 128, "Some Text");
SendClientMessageToAll(0x00FF00FF, Msg);
}


