-
Posts
822 -
Joined
-
Last visited
-
Days Won
86
Everything posted by The_GTA
-
Since by that number you mean the amount of game RAM please mind that the MTA client is not allowed to allocate more than 4GB of RAM. This is because GTA San Andreas is a 32bit game. It does not matter to the game that you have more than 4GB of RAM available on your system.
-
Just making sure: with use of RAM do you mean the entire Windows OS or the MTA client application (gta_sa.exe) only? Or did you accidentally state the RAM usage of the server instead?
-
Don't worry. Welcome to the MTA forums, friend! ?
- 8 replies
-
- 1
-
- stock market
- stocks
-
(and 1 more)
Tagged with:
-
Hey, maybe we got it all wrong! That guy could just be saying that Grand Theft Auto San Andreas is an "epic game", completely detached from that same-named company! But what do I know. In hindsight I find it funny to read this implication. Also it was funny how the user did totally ignore your question, but has edited his post to address it. An interesting point about his report log appears to be the error code 0xE0000008. What does this custom HRESULT mean?
-
Hello developers, I have just found out today about the launch of Visual Studio 2022. There appears to be a launch event along a featured livestream aswell. (Kind of psycho how Bing is tracking URL-clicks using newtabredir-redirection now similar to Google). But more interestingly there is a list of changes. It is a bunch of bla-bla and if you just want my word for it, as professional a user I am, then go for the upgrade. Give it a try. They did not mess it up and it looks much more beautiful than before. Do not forget to reconfigure the IDE options (turn off automatic formatting, disable Git addon, set to use spaces and not tabs) though because they do not take over these settings! If you don't like crammed source lines, as displayed in the above picture due to the fatter and more readable font, then consider increasing the distance of source lines in the IDE configuration. Or just switch back to the good-old Consolas font. It works better in my opinion, even if it is a very fine detail related to the spacing on the top. Have fun!
-
Sorry, but your information is wrong. The MTA:SA community is still offering the resource. Did you really mean to say that the resource is not available or is this a miscommunication? (if the above post by pontazok happens to be an abuse-case then forums moderation is allowed to remove my post aswell) There appear to be 502 Bad Gateway issues when connecting to the MTA websites. Your post may have been a result due to those indications of server malfunctionality. It does not change the fact that your information is wrong and if you tried multiple times then you would have gotten to the download page.
- 8 replies
-
- stock market
- stocks
-
(and 1 more)
Tagged with:
-
Now I am going to assume that you have got a 3D model file called "sphere.dff" which is textured with texture name "tex". There are multiple approaches now to animate such a model but we are going for the simplest first. For that we want to do the following: Make use of the MTA RenderWare DFF system by loading our 3D model using engineLoadDFF, requesting a new object model ID using engineRequestModel and then using engineReplaceModel to load the triangles into the new model ID slot. Then we can use the clientside createObject function to put our sphere "3d round object" into the game. After that we can use the community function attachElementToBone to put the sphere onto the hand of the ped inside of an onClientPreRender event handler. Next we would create a simple texture-replace shader using dxCreateShader, attach it onto the sphere object using the engineApplyShaderToWorldTexture function and link our texture, loaded using dxCreateTexture, into it. Last but not least we should cycle through our animation textures as usual while setting each new texture into our shader using the dxSetShaderValue function. Simple texture replace shader: texture tex; technique treplace { pass P0 { Texture[0] = tex; } } Hope this helps!
-
I would not say that there is none because @Toliak is developing a TypeScript to Lua transpiler over here: In his video at around 5:23 he mentions that he is using Visual Studio Code (VSC) as an IDE. There appears to be a MTA API declaration package aswell for auto-completion in VSC. Please consider giving his product a try!
-
Hello MTA community, in support requests I am facing some difficulty understanding why the relationship between supporter and the to-be-supported is difficult. I am sensing that we are living in a world ruled by smartphones and that many users browse using devices which do not come with a comfortable keyboard. Understandably, I would not want to type long replies - including thoughtful elaborations and direct explicative answers to supporter questions - on a touchscreen keyboard. As a way to mend wounds by increased understanding I suggest detection of smartphone or PC presence on the forums. Since I am a developer I know that this is possible by voluntary browser meta-data provided by forum clients. Please give my suggestion an educated thought!
-
You could attach a shader onto the object and animate it like that. There are several approaches but you need a "round" 3D model first which is a set of vertices that make things look round. Else you will always face the problem of billboards that they are just an oriented sheet of paper in 3D space. If you to draw a circle then you should just modify the texture into a circle.
-
Since we have started talking about the creation of realistic waterfalls how about you add a 3D sound effect to it? I recommend you to look for free sounds effects on the internet, for example this one: Freesound - "Waterfall" by straget If you are using "free" sound effects on the internet then please follow the licensing terms. The above sound I have linked requires you to mention the author and/or the location of the sound in your MTA server. In general as long as the author is offering the sound on such "free community" online services - whose usage grant is only very seldomly revoked, but possible - your MTA server's usage rights cannot be revoked either.
-
Have you tried fixing the variable "thePlayer" to "player"?
-
How about you create this textured sphere in a DFF model editor and then import it into the game? Once you are finished then we can talk about how to display it.
-
@Krokara @Mkl I have adjusted the scaling in the function because I forgot to half it. The scale_w and scale_h parameters are meant to be the world-coordinate units size of the texture.
-
I still cannot understand what kind of code you are looking for. The above script has some errors [EDIT]. Could you please help us understand what is missing from the script? which "admin" should receive those messages? should all admins receive it or specific admins (issuer of command, admin group, etc) what players should be spied on? I recommend you to detect admins based on the player account. When a player has logged into an internal MTA server account, then that account can be given rights inside of the ACL.xml file. Inside of that file you can create a special permission called "spychat" as well as limit the accessibility to MTA commands (for example /spy). You could loop through all logged in players using a for-loop on getElementsByType("player") and create a list of only the players that meet the "spychat" permission/right.
-
Thank you very much for testing it and telling me about this coding mistake! ? I have fixed the above code.
-
Hello MrLoki, I have found this topic inside of our forums that seems to ask a similar question. Does it help you in any way? If not, could you explain what the solutions provided in said topic are missing based on your imagination?
-
You seem to lack the mathematical and modelling experience about the human vision. Let me start out by giving you an idea about what is required in your script. Have you ever heard about the concept of sprites in 3D graphics? One of the most famous 3D sprite applications of the internet world is found in Sonic Robo Blast 2: By watching this video you see that the character of Sonic, Tails and Knuckles are, when looking at them through the game camera, always visible up-front. In my previous post I have indicated that the "jutsu"-effect you have shown me is made using 3D triangles. Thus it is a matter of orientation so that the triangles are visible up-front, as if looking straight at a sheet of paper. I hope you still remember from your school days what an euler angle or vector is. In the above image you can see that our vision can be modelled as a cut-out from a sphere based on 3D angle intervals. For you this is important because we want the 3D sprite to be oriented orthogonal to the vision so we see it without tilting/up-front. Now that we have a clear understanding of the model, let's go on to the mathematics. We first define the viewing vector as the line between the eye and the viewed-at object (subtract the eye position from the billboard middle position). There is a vector called the paper-sheet-direction which is 90 euler angle degrees rotated from the viewing vector (in 2D space). paper-sheet-direction = ( viewing-dir-y, -viewing-dir-x, 0 ) normalized to length 1 The paper-sheet-direction (psd) and the normalized cross-product between psd and the viewing vector are the vectors that make-up of the texture effect that we are looking for. Here is some code that I quickly made for you: local function get_billboard_vertices(ox, oy, oz, scale_w, scale_h) local vx, vy, vz = getCameraMatrix(); -- Half the scale because we will use it to expand twice, in positive and negative directions. scale_w = scale_w / 2; scale_h = scale_h / 2; local vx, vy, vz = ( ox - vx ), ( oy - vy ), ( oz - vz ); local psd_x, psd_y, psd_z = ( vy ), ( -vx ), 0; local dp_x, dp_y, dp_z = ( vy * psd_z - psd_y * vz ), ( vz * psd_x - psd_z * vx ), ( vx * psd_y - psd_x * vy ); local psd_len = math.sqrt( psd_x * psd_x + psd_y * psd_y + psd_z * psd_z ); local dp_len = math.sqrt( dp_x * dp_x + dp_y * dp_y + dp_z * dp_z ); local npsd_x, npsd_y, npsd_z = psd_x / psd_len, psd_y / psd_len, psd_z / psd_len; local ndp_x, ndp_y, ndp_z = dp_x / dp_len, dp_y / dp_len, dp_z / dp_len; local obl_x = -npsd_x * scale_w - ndp_x * scale_h; local obl_y = -npsd_y * scale_w - ndp_y * scale_h; local obl_z = -npsd_z * scale_w - ndp_z * scale_h; local bottom_left = { ox + obl_x, oy + obl_y, oz + obl_z }; local top_right = { ox - obl_x, oy - obl_y, oz - obl_z }; local otl_x = -npsd_x * scale_w + ndp_x * scale_h; local otl_y = -npsd_y * scale_w + ndp_y * scale_h; local otl_z = -npsd_z * scale_w + ndp_z * scale_h; local top_left = { ox + otl_x, oy + otl_y, oz + otl_z }; local bottom_right = { ox - otl_x, oy - otl_y, oz - otl_z }; return top_left, top_right, bottom_right, bottom_left; end This code has been untested but should contain the things I mentioned above. If you use the "trianglestip" primitive type then you can use the vertices in the same order for the dxDrawMaterialPrimitive3D function. Please try the code and tell me how it works for you! Good luck!
-
You need to put the triangle coordinates into a 3-tuple { x, y, z }, then pass the vertices as 4th+ arguments to dxDrawMaterialPrimitive3D. Do not forget to define the z-coordinate of the second coordinate! Also, you need to draw this as triangles. If you have attended school then you know that a triangle consists of 3 points. By using the "trianglelist" primitive type you need to define 3 points for each triangle, thus you need to push 6 vertices to dxDrawMaterialPrimitive3D! There is an example using a different primitive type inside of the wiki documentation of dxDrawPrimitive3D.
-
Hello Hydra, do you know about the onSettingChange serverside event? Whenever you change the outputNewsTimer setting, either through the admin panel or programmatically inside of your own resource, this event will be triggered with the "outputNewsTimer" string as setting name, the old and new values. Inside of the event handler you should change the timer period by killing the old timer and setting a new one using the same closure/function (showMessages). You are saying that it does not work "when I change the values". I assume that you do not mean that the actual script stops working, but that you are not seeing the intended change in resource behaviour. But in the script that you have provided you do not command the Lua environment to perform the change so if you do not use the event handler that I have recommended it is working without bugs but not like you imagined it.
-
Hello Krokara, this is actually not a very difficult task, if you have all the texture files to cycle through and knowledge of MTA drawing functions. For this task I recommend you to use the dx family of drawing functions. First you need to register an onClientRender event handler. Inside of it you use getPedBonePosition to find the 3D world coordinates of the ped's hand. While applying some custom layout-logic, use the dxDrawMaterialPrimitive3D function to draw two triangles forming a quad with the desired dimensions and texture animation frame at the world position of the ped's hand. Do not forget to cycle through the animation frames so the sparkly image changes depending on the elapsed time! How about you try your hands at some code? If you have any further trouble about the implementation then feel free to ask! ?
-
Hello Leinad Raiz, this seems like a double post. Please respond to my answer in another thread which is about the same issue:
-
Hello _Marco_, since we are not a SQL support forums you can search on other domains if you want a solution based on SQL only. What you are asking though can be achieved inside of Lua. I am going to assume that you habe full access to the resource and want to modify it to provide a /listcommands feature. I am also going to assume that every command that you are interested in is registered during resource start-up. In that case you can make use of meta.xml load order to hook the addCommandHandler function before it is executed and fetch all of these commands into an internal list. For example... meta.xml: <meta> <script src="hook.lua" type="client" /> <script src="client1.lua" type="client" /> ... <script src="clientn.lua" type="client" /> </meta> hook.lua: local _addCommandHandler = addCommandHandler; local cmdlist = {}; function addCommandHandler(cmdname, ...) cmdlist[cmdname] = true; return _addCommandHandler(cmdname, ...); end -- SERVERSIDE. _addCommandHandler("listcommands", function(player) outputChatBox("--- cmdlist ---", player); for m,n in pairs(cmdlist) do outputChatBox("* " .. m); end end ); Can you follow me this far? Now you have a cmdlist variable which contains a table that contains unique command names as table keys that can be retrieved using pairs for-loop. The next step would be to push all the data to a SQL database at resource stop. Good luck! ?
- 1 reply
-
- 1
-
I don't know why, but you are taking part in the same resource thievery that the user @Pantryis taking part in. https://forum.multitheftauto.com/topic/132975-mysql-script-errors/?do=findComment&comment=1002773 https://forum.multitheftauto.com/topic/133046-problem-with-function-passwordverify/?do=findComment&comment=1002963 Is this nl_npc resource one of those resources you downloaded from the internet, leaked from some MTA server? Do you know such behaviour would hurt legitimate scripters? @GoodNight What do you think? Is this also code from InsideMTA? Anyway, to guide you in your question: is createNPC even called? are there errors inside of the nl_npc resource?
-
Hello MidoZ, I made a quick search on our forums and have found a thread mentioning this nVidia Optimus thing: Does that help you in any way? Are there things in that thread that also apply to you?