SA-MP Forums Archive
How I should do this system? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: General (https://sampforum.blast.hk/forumdisplay.php?fid=13)
+--- Thread: How I should do this system? (/showthread.php?tid=482873)



How I should do this system? - Ernestas_ - 23.12.2013

I'm working with house system and now it works like this:
Server loads houses and creates 3Dtexts. When you click F and you aren't in any vehicle server does Mysql query to see if you are near to any entry into house.
Should I save everything into variables or doing query everytime is ok? It's my first gamemode and I don't know if it won't lag.


Re: How I should do this system? - Emmet_ - 23.12.2013

Save everything into a 2D enumerator array. Executing queries all of the time isn't that overall efficient, and it could slow down your overall server performance.