RizoN
-
Posts
27 -
Joined
-
Last visited
Posts posted by RizoN
-
-
Well done guys!
40 minutes ago, Piorun said:What's this: https://wiki.multitheftauto.com/wiki/SetDebugViewActive?
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
-
Nice work you did there.
-
This looks pretty nice. Keep it up!
-
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?
-
20 minutes ago, LoPollo said:
Do not expect me to help you, i'm noob at this. Sorry

If i understand with colliding you mean overwriting right? so both first and second, 2 different objects (that's why you get 2 differents "signature"), will have same data
But does this happen if you make 2 copy of the .fx shader file?
In the code i can't see any cause of overwriting... even the only variable with the same name in the script is tTable which is local.... but i'm a noob at this.
I just want to make this as clear as possible.
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. -
I've even compared the shaders of same instance of same filepath, and they all are different elements!
QuoteHUD Shader Signature: userdata: 67908738
Other Shader Signature: userdata: 67908B20 -
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:
SpoilerFirstTable = {} FirstTable.__index = FirstTable function FirstTable:new() local tTable = setmetatable({}, FirstTable) tTable.hudMaskShader = dxCreateShader("files/shaders/hud_mask.fx") tTable.radarTexture = dxCreateTexture("files/images/map.png") tTable.maskTexture = dxCreateTexture("files/images/circle_mask.png") dxSetShaderValue( tTable.hudMaskShader, "sPicTexture", tTable.radarTexture ) dxSetShaderValue( tTable.hudMaskShader, "sMaskTexture", tTable.maskTexture ) return tTable end SecondTable = {} SecondTable.__index = SecondTable function SecondTable:new() local tTable = setmetatable({}, SecondTable) tTable.otherShader = dxCreateShader("files/shaders/hud_mask.fx") tTable.otherTexture = dxCreateTexture("files/images/other.png") tTable.otherMaskTexture = dxCreateTexture("files/images/other_mask.png") dxSetShaderValue( tTable.otherShader, "sPicTexture", tTable.otherTexture ) dxSetShaderValue( tTable.otherShader, "sMaskTexture", tTable.otherMaskTexture ) return tTable end local myFirstTable = FirstTable:new() local mySecondTable = SecondTable:new()
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.
-
1 hour ago, Bonsai said:
You can edit your messages after you sent them?
I don't think so.
He probably means that a custom chatbox system could be developed.
-
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 -
3 hours ago, NeverGiveup said:
Compile and Create a backdoor for yourself for example;
You set a root element data like
setElementData(root, "mapSecure", "randomCodes") and then in your every map put a check on very top before your main script if the elment data is right otherwise return false and not loading the maps.
Eg:
if getElementData(root, "mapSecure") ~= "randomCodes" then return false end
--rest of the codes---
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?

-
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)
-
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?) -
49 minutes ago, Gravestone said:
Are you sure? The website is online for me.
You've misread my post. I said: in case of being offline, I haven't said that it's offline

48 minutes ago, GTX said:It really depends: Are you making a multigamemode? If so, go for client side because if you do it on server side, you will load map for every player in the server, which is not good. On the other hand, if you want to load a map for all players in the server, you should go for server side.
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. -
7 minutes ago, Gravestone said:
This is the most important point you should consider, since the performance of the server matters alot. I know an idea about having the map's on client sided. You can convert your maps to lua form using something like this and then use any client file protecting way for example the most common, 'cache=false' attribute in the meta. However this does not fully protect your files but there are many other tutorials by forum members, you can go look for them.

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. -
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. -
Awesome update guys! Especially thanks to @ccw @darkdreamingdan @Jusonex @qaisjp @Necktrox @lopezloo @Dutchman101 and everyone else involved with helping with/reporting MTA bugs

-
2
-
-
I suggest setting postGUI to true to make it look more realistic (hides MTA watermark), anyway good job ^^
-
2
-
-
35 minutes ago, Developer Ahmed said:
now only 10K on 4K servers [ -10K ]
Depends at what time you play. At 6 pm CET there were 20k.
-
3 minutes ago, Developer Ahmed said:
اعتقد ان الشباب ما عاد يلعبو هاذي اللعبة متل زمان
-----------------------------------------------
I think a lot of players no longer play this game !What are you talking about? There are like 20k players playing per day
-
Good job guys! Hopefully all the issues will be resolved and soon we'll be able to update

-
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)
-
1
-
-
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
-
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.
-
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).

dbQuery doesnt pass my function to callback function
in Scripting
Posted · Edited by RizoN
Hello, I'm trying to do this:
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?