Jump to content

RizoN

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by RizoN

  1. Hello, I'm trying to do this: function testFunction(sData, sSomething) local callbackFunction = function(result) outputChatBox(tostring(result)) end -- callback function is defined properly here Database:query(MyHandlerFunction, {callbackFunction, sData}, "SELECT * FROM my_database_table WHERE something=?", sSomething) end function MyHandlerFunction(query, func, data) -- func is nil here, but data is not nil func("hello") -- returns error, as it says that func is nil end testFunction("mydata", "123") I'm using OOP the query function doesn't seem to want to transport my callback function to my handler function, is it a query function limit or something? like it cant transport functions?
  2. Well done guys! I haven't tried it out, but I think it's used for enabling/disabling debugscript without the need to use e.g /debugscript 0 to disable it
  3. RizoN

    MTA Offline Wiki

    This looks pretty nice. Keep it up!
  4. I have pretty much similar questions as @ut0pic Would this only increase streaming limit of elements like in MTA:Eir project so that we could basically render whole SA map at once without glitching, or does it extend also to adding new IDs for weapons, vehicles, objects, and so on? If it would also enable us to add custom IDs, would we be able to make a custom weapon/vehicle system for players? Having those new potentional functions in Lua would be really awesome. Edit: oh and, what about CLEO mods and custom animations?
  5. 2 Instances of same shader file can co-exist and have different data for same attributes. Yes it's impossible that they overwrite each other but still it's happening for unknown reason. Making copies of .fx is not a solution I'm looking for because it should be possible to do with dxCreateShader in multiple instances. (In fact in my actual script, the first table already has in each instance of itself the same shader, and it works with seperate images, but when second table gets created, it somehow overwrites first table even though they're not connected in any way.) I have no idea how to fix this issue.
  6. I've even compared the shaders of same instance of same filepath, and they all are different elements!
  7. Hello. I've ran into some strange issue. I've got two seperate tables which store to themselves shader from same location e.g files/shaders/hud_mask.fx so to show it as an example, it'd look like this: This is just an example code. My problem with this system of usage is, i am expecting when i use dxCreateShader for same file twice but in two different tables that it will return me two different instances of the same shader so that they don't collide with each other. But for me, they do collide for unknown reason. The second shader and its data stored in sPicTexture and sMaskTexture overwrite first shader even though they shouldn't be connected at all. How can i solve this? Thanks for reading.
  8. He probably means that a custom chatbox system could be developed.
  9. Also, if let's say 50 players start downloading a 1MB file from server via latent client event, would that make the server lag? Also what bandwidth limit is recommended in these situations? @GTX
  10. Could you please explain what is this useful for? I don't think there's a need for this since everything here is happening at server-side, and using root on setElementData is a little bit inefficient, don't you think?
  11. Okay, thanks for answering my questions Luckily there's a .htaccess file with which you can restrict access just to your server ip (yes I'm aware that only a serverside fetchRemote function will work for these files)
  12. Thank you for explaining this to me. Could you please tell me why is fetchRemote so insecure as you are saying? Also I don't really know how to use that compression thing which you were saying (if you got the time could you shortly introduce me to it?)
  13. You've misread my post. I said: in case of being offline, I haven't said that it's offline Thanks for replying, What about the security issues? Maps could be stolen this way Also, another question popped in my head. Which way would be recommended to download maps? (I believe you have experience with this) There are couple of things that get transferred from a custom maploader to client 1. Map settings (extracted from .map file) (is sending this to a client via triggerClientEvent bad?) 2. Map files(sounds, mods) (would downloadFile be fine, or do i need to download it from a server via fetchRemote? there's also latent events, but I hear they're bad impact on server when lots of players) I hope you or somebody else could give me a clear thought about this, since I'm not really sure anymore which is the best way.
  14. Thanks for replying, I am already extracting XML data from .map files and placing it inside of a Lua table containing all elements. Using external convertor is a much slower method of achieving this, and in case of the website being offline/having bugs, I wouldn't be able to do anything about it. The maps when transferred to client are already in his computer's memory and are deleted when all necessary elements(objects, vehicles, etc) are created.
  15. Hello there. I'm having a dilemma about this. Is it better to create all elements(like objects) on client side, or server side? Of course, there are lot of things which could determine which option is better. Pros of client-side 1. Creating thousands of objects on client-side is far better than on server-side (example: DM Maps) 2. Good for gamemodes which don't require too much sync Cons of client-side 1. Vehicles, peds, breakable objects aren't that well synced as if they would be on server-side 2. Security issues (everything on client side could be manipulated into malicious client's will) 3. Maps could be stolen Pros of server-side 1. Great sync for vehicles, peds, breakable objects 2. Clients cannot manipulate or steal server-sided elements by themselves Cons of server-side 1. Huge performance impact when dealing with lot of elements(objects, vehicles) 2. Makes server laggy after some time So, what do you think? Is it better to sacrifice security for better loading or should the server handle it? Should map loading type be based on gamemode/what we're loading? Any better ideas? Thanks for reading I would appreciate if someone with experience could reply to this topic.
  16. Awesome update guys! Especially thanks to @ccw @darkdreamingdan @Jusonex @qaisjp @Necktrox @lopezloo @Dutchman101 and everyone else involved with helping with/reporting MTA bugs
  17. I suggest setting postGUI to true to make it look more realistic (hides MTA watermark), anyway good job ^^
  18. If you would develop your own map loader, you could simply transfer map data from server to client and keep it there and load when needed (however keeping .map file on client without encrypting it will result in your maps to be easily stolen)
  19. Try checking if db even exists. I believe that there's an error in Database:new function You've coded Database:new function in a way that it expects 'obj' to be a table, but instead, you're sending filepath of database which is probably why it doesn't even create the db at all. local db = Database:new{ ":db/dev.sql" } -- This is part where you're sending a filepath instead of a table to Database:new function
  20. Don't, because if oop is enabled in meta.xml file in Class resource, export won't work. However I've noticed this part in Class resource's script: -- Properties Database = { db_file_path = nil -- <- This } I suppose this is the reason why it's nil. Try updating it at function/place where you're creating the database at.
  21. In case you've enabled oop in meta.xml file, exports won't work (unless the resource in which export function is in doesn't have oop enabled in it's meta.xml file).
×
×
  • Create New...