inquiring about "script optmization"
#1

i have some questions that i could not find awnsers anywhere...
someone help me out ,plz,XD

1- whats better one global textdraw or one textdraw for each player , i mean in terms of memory usage & peformance and why?

global text
new Text:board;
board = TextDrawCreate(320,432.5," ")........
or
new Text:board[MAX_PLAYERS];
board [playerid]= TextDrawCreate(320,432.5," ").......
and every player will have his very own textdraw...


2- which one is better from the cases bellow.... and why?
which one is faster to read/store data?

Plevel[MAX_PLAYERS];
Pscore[MAX_PLAYERS];

or

enum info
{
level,
score
}
new Pinfo[MAX_PLAYERS][info];


or

SetPVarInt(playerid, "level",1);

even

#define Player(%1,%2) playerinfo[ %1 ][ %2 ]

Player(playerid,level) etc.........
Reply


Messages In This Thread
inquiring about "script optmization" - by Volks - 14.01.2011, 21:10
Re: inquiring about "script optmization" - by WillyP - 14.01.2011, 21:12
Re: inquiring about "script optmization" - by ғαιιοцт - 14.01.2011, 23:10
Re: inquiring about "script optmization" - by Babul - 14.01.2011, 23:52
Re: inquiring about "script optmization" - by Volks - 16.01.2011, 20:28
Re: inquiring about "script optmization" - by Joe Staff - 16.01.2011, 20:48
Re: inquiring about "script optmization" - by Leeroy. - 17.01.2011, 08:42

Forum Jump:


Users browsing this thread: 3 Guest(s)