Jump to content

DiSaMe

Helpers
  • Posts

    1,449
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by DiSaMe

  1. It's not like we are going to believe you. First, why do you choose a script which, apart from being leaked, is more advanced than many other scripts you could learn from? And second, how can you learn by having someone else fix something that you didn't make? Seriously, I don't understand why you are doing this. Why do you want to make a server with leaked scripts instead of making your own? What's the point of opening an art exhibition if you have nothing of your own to show?
  2. Of course this is not "intended", it's simply what physical elements are limited to. They cannot just move "on their own", they must have a syncer, because MTA server, being completely separate from GTA engine, does not have physics. It has to rely on the client it sets as the syncer to sync the information about the element, such as position. Since the objects far away from the player are not loaded, physics don't work properly there, so if there are no players near the element, it won't have anyone to sync it, resulting in element staying in the same position, no matter what the players see. The easiest approach to the solution for this problem is using setElementPosition server-side to simulate the movement of the ped. That's how I made it in NPC HLC to keep the peds synced when they go out of client-side sync range.
  3. Since the script is client-side and the clients are not aware of commands typed in by other clients, client-side command handlers don't have the player argument: function drawTag( cmd, size, font, colorCode, teamColor, cR, cG, cB ) I don't agree. For a scripting beginner, it's good to experiment with many different things before focusing on a single project.
  4. fileOpen fileRead fileWrite triggerClientEvent
  5. Unless specified otherwise, string.find uses patterns rather than plain strings. Dot is one of the special characters and it means any character. You either have to disable the pattern matching a , e = string.find (zahl, ".", 1, true) Or escape the magic character a , e = string.find (zahl, "%.")
  6. https://wiki.multitheftauto.com/wiki/Sh ... ture_names ?
  7. This: local distance = 9999999 And this: if ( dist < distance ) then Since distance is always 9999999, you keep checking distance to every hospital against 9999999, which will always be true, therefore the result will be the one which is the last on the list.
  8. DiSaMe

    MySQL

    It shows what the table looks like in the examples of dbPoll page. The value is in table[row_number]["column_name"]. In your case, it's probably like this: result[row]["LAST_INSERT_ID()"] To give the column another name (so that the expression string would not be used for it), execute a query with explicitly specified column name: local query = dbQuery(connection, "SELECT LAST_INSERT_ID() AS id") And the result will be: result[row].id
  9. DiSaMe

    MySQL

    Of course it does, that means 10 ms isn't enough to get the result. In theory, no amount of time can guarantee that the result will be ready. If you want the result to be always returned, make the waiting time unlimited: local result = dbPoll(query, -1)
  10. DiSaMe

    MySQL

    http://dev.mysql.com/doc/refman/5.7/en/ ... -insert-id
  11. You could attach them: attachElements And the cars will move as the plane does instead of colliding.
  12. If you need to get something from another site, use this function: fetchRemote
  13. Arm stays up because the last argument of setPedAnimation (freezeLastFrame) is set to 'true' by default. You need to set it to 'false'.
  14. Wrong. Loop is a code structure which executes the block of code repeatedly as long as some condition is met. Yes, it can be used with a table, but it doesn't need to be.
  15. I'm not sure if it's more related to MTA or Wine, since I think it's a regression in Wine. I use Arch Linux and run MTA using Wine 1.4.1. It works fine on this version. But it doesn't start on 1.5 releases. If I try to run MTA via terminal, this is what I get: [crystalmv@crystalmv-archlinux MTA San Andreas 1.3]$ wine 'Multi Theft Auto.exe' fixme:ole:CoInitializeSecurity ((nil),-1,(nil),(nil),0,3,(nil),0,(nil)) - stub! fixme:wbemprox:client_security_SetBlanket 0x7d7010f8, 0x1b1188, 10, 0, (null), 3, 3, (nil), 0x00000000 fixme:wbemprox:client_security_Release 0x7d7010f8 fixme:advapi:RegisterTraceGuidsW (0xa324d0, 0xa3d6e8, {7c830ece-5fb3-417a-a1bd-508f45277356}, 1, 0x33f464, (null), (null), 0xa3d6f0,): stub fixme:advapi:RegisterTraceGuidsW (0xd924d0, 0xd9d6e8, {7c830ece-5fb3-417a-a1bd-508f45277356}, 1, 0x33f404, (null), (null), 0xd9d6f0,): stub fixme:msvcrt:__clean_type_info_names_internal (0xb85f20) stub fixme:advapi:RegisterTraceGuidsW (0x3c24d0, 0x3cd6e8, {7c830ece-5fb3-417a-a1bd-508f45277356}, 1, 0x197e644, (null), (null), 0x3cd6f0,): stub err:rpc:I_RpcGetBuffer no binding fixme:msvcrt:__clean_type_info_names_internal (0x10051a80) stub fixme:msvcrt:__clean_type_info_names_internal (0x960b48) stub fixme:msvcrt:__clean_type_info_names_internal (0xa214a0) stub I guess it's a Wine regression. The earliest version I got this problem on was 1.5.28 and I don't know which version brought this problem. Although I can use 1.4.1 to run MTA, I want it to work in future stable releases too.
  16. DiSaMe

    applying LOD?

    setLowLODElement
  17. Since it's not magic, it doesn't matter how you stored the value, that's how programming works. To get the data from MySQL, use SELECT statement in dbQuery and then dbPoll to get the result.
  18. Look at that page to find out how.
  19. DiSaMe

    Tab Settings

    Go to MTA San Andreas/mods/deathmatch/resources/scoreboard, there's a file settings.xml in it. You can either delete it to reset the settings or open it and change the scale value.
  20. You can't destroy DX drawings because they don't exist. They don't exist because DX drawing functions don't create anything. All what they do is changing the colors of some pixels on the screen. Our minds interpret these areas of pixels as distinct elements. What's more, since the game redraws the view every frame (therefore removing any color changes done by DX drawing functions), even if we consider them distinct elements, they still disappear quickly after being drawn. But if you call drawing functions every frame, colors of pixels are changed again and again, and our minds interpret this as continuous existence of some distinct element. And if you stop calling the drawing functions (such as removeEventHandler, like Castillo said, or using if ... then ... end condition blocks), the colors of pixels will stop being changed, resulting in illusion of disappearance of something that doesn't actually exist. Therefore DX drawings in some sense are creations of our tricky minds. I hope this philosophy will help you to understand how DX drawings work
  21. DiSaMe

    Highmap

    Maybe, but why don't you just ask here?
  22. DiSaMe

    Highmap

    You can cast a ray from sky to the ground to find what material is at that point using. So if you create a render target, go through every square meter (or some less precise area, like 2x2 or 4x4) of the map, getting the material and drawing a pixel of its color into the render target during the process, the render target will contain the map which you can save into the image file. dxCreateRenderTarget processLineOfSight, testLineAgainstWater --to get the material dxDrawRectangle --to draw the pixel dxGetTexturePixels --to get the texture data fileCreate, fileWrite, fileClose --to write that data into the file And remember, when you cast the ray, the local player must be near enough to make sure that objects are loaded.
×
×
  • Create New...