SA-MP Forums Archive
What is faster? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What is faster? (/showthread.php?tid=84462)



What is faster? - Remi-X - 30.06.2009

Hi, i want to know what is faster for my Admin system:

Shall i use stocks, like UserMoney(playerid) wich gets the players money out of his file, or when somebody login, all his stats wil be saved in arrays like 'new UserMoney[MAX_PLAYERS];'?


Re: What is faster? - James_Alex - 30.06.2009

i think you must use new PlayerMoney[playerid] for example
which is saved in a file, it's a lot better


Re: What is faster? - Grim_ - 30.06.2009

I don't understand you too well, but you should save all info saving to one enum
pawn Код:
enum Info
{
  Money,
  AdminLevel,
};
new PlayerInfo[MAX_PLAYERS][Info];
and so on.


Re: What is faster? - Remi-X - 01.07.2009

So a enum is the most fast?


Re: What is faster? - Grim_ - 01.07.2009

Quote:
Originally Posted by Remi-X
So a enum is the most fast?
To my knowledge, yes.


Re: What is faster? - Remi-X - 01.07.2009

ok, tnx


Re: What is faster? - yezizhu - 01.07.2009

That depends on what you need.
If you wanna save admin money when logs out, both using, please.
Else only momory.
File system uses for save/load.
Memory uses for in-game.
Think what you need first, think want is more efficient then.(my programing opinion)


Re: What is faster? - Remi-X - 01.07.2009

I really don't know what you mean


Re: What is faster? - yezizhu - 01.07.2009

Script more will get what I mean XD


Re: What is faster? - Remi-X - 01.07.2009

watefak