Jump to content

Pembo

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Pembo

  1. Pembo

    Severe Mouse Delay

    Wops I mean out of all resolutions it worked in 1600 x 900 and 1024 x 768 and of course I eventually got it to work in 1080p.
  2. Pembo

    Severe Mouse Delay

    Well sorry for adding it a bit late but I also I didn't mention the problem I have with changing resolutions (or even being able to run MTA on first installation). The screen resolution for my PC monitor and 2 laptops is 1080p and on every one of them I have had trouble when first launching MTA. The problem I had on them was that I could not launch it at all (kept getting a black screen) so I forced it into 640 x 480 res and it worked. I then restarted MTA and it launched automatically in 640 x 480 and I went into settings and changed MTA res to nearly all available and of all of them, only 1600 x 900 x 32 worked (still with mouse lag btw). After reattempting to get 1080 res to work over and over it eventually did and now I'm currently using 1080 but again, with mouse lag. Although I did find a way round the resolution issue its still necessary for me to mention it because maybe it is linked to the mouse lag? I don't know anyone else with this issue and it does it for ALL 3 of my systems which I find really odd. About your instructions to try it in 1024 x 768 in windowed, I have done this and the mouse has delay in all scenarios (focus, desktop etc). It does this for all resolutions whether or not it is windowed. Now I'm trying to get it to work in 1080p again lmao.
  3. Pembo

    Severe Mouse Delay

    It is the Razer Naga Epic Chroma. I should also add that I have the same issue using other mice and even my laptops touchpad.
  4. To convert hours to minutes: function hoursToMinutes(hours) local seconds = 3600 * hours local minutes = seconds / 60 return minutes end
  5. Pembo

    Severe Mouse Delay

    https://pastebin.mtasa.com/322835729
  6. Pembo

    Severe Mouse Delay

    I have been having a lot of trouble with my mouse lately that's causing it to have a very large delay on MTA which makes it LITERALLY impossible to play on a server normally. Although the issue originally arose some time last year, it is only now it has came to my proper attention again as I wish to be able to play on a server. I have tried many things to fix this and I can safely dismiss it being the mouse simply because it does this on MTA only; and on my other two PC's as well. Does anyone have any idea what the issue is and how I can solve it? I have tried quite a few things now but there are hardly any topics related to this kind of issue.
  7. Pembo

    I need HELP pls

    Here is a command that can be used to toggle all players visibility: Server --//Variable stating whether players are visible or not local is_visible = "true" function setPlayersVisibility(src, cmd, state) if (not state or state ~= "true" or state ~= "false") then outputChatBox("Syntax: /setplayersvisible <state>", src, 255, 0, 0) return false end if (state == is_visible) then outputChatBox("Players visibility is already set to this value.", src, 255, 0, 0) return false end for _, player in ipairs(getElementsByType("player")) if (state == "true") then if (is_visible ~= "true") then is_visible = "true" end setElementAlpha(player, 255) else if (is_visible ~= "false") then is_visible = "false" end setElementAlpha(player, 0) end end outputChatBox("You have changed the visibility of all players to ".. is_visible .. ".", src, 0, 255, 0) return true end addCommandHandler("setplayersvisible", setPlayersVisibility) Also, if you want to make them completely invisible you could use: setPlayerHudComponentVisible ( player thePlayer, string component, bool show ) This can be used to hide their nametag.
  8. Pembo

    Mta sa server

    To answer this there are a few ways to fix this issue. -The first option would be to upgrade your server package or change hosts so that you can have more CPU power and RAM. It is certainly beneficial to have a good server host and package, especially if your server has a decent amount of players daily. -Secondly you should fix scripts that contain sloppy code as they can use up an exponential amount of CPU power. This can be done by eliminating certain culprits within your code like for example; triggering server events on the root element where not necessary. This will have a huge impact on your servers performance and learning to script in MTA efficiently and elegantly will reduce your chances of making this mistake. It is of course wise to take both options into careful consideration and determine what the actual problem is in your situation. If indeed you server is just lacking the power required to run properly, upgrade it.
  9. In the client code you have made it so the render function will only run for one frame only simply because you removed the event immediately after. You need a way to make the render function end when the player stops typing. Also, I would not advise that you use the same name for your event as your function as this can cause confusion.
  10. Like how far above, just slightly? Also what size is your marker?
  11. change it to: function eventstart() local countdown = setTimer(countdownFin, 5000, 1) addEventHandler("onClientRender", root, eventszamlalas) end addCommandHandler("asd", eventstart)
  12. It's because you initialised the timer in the global scope meaning it basically gives you the same result as using the event "onResourceStart". If you want to set a timer when called for, use it within a function instead of the global scope.
  13. No longer searching for a partner.
  14. Pembo

    GUI Click

    Ah okay glad you fixed it.
  15. Pembo

    GUI Click

    AH! The error is that your using source instead of client. Replace 'veh[source]' with 'veh[client]'.
  16. Pembo

    GUI Click

    What errors are displayed on the debug output?
  17. Pembo

    GUI Click

    Hmm. Show me the code for the server side function attached to the event 'getCar' and I'll look further for you.
  18. Pembo

    GUI Click

    function trigger() local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if ( ( row ~= -1 ) and ( col ~= -1 ) ) then local car = guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) if ( ( car == "" ) or ( car == nil ) ) then return end triggerServerEvent( "getCar", getLocalPlayer(), car ) guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end end addEventHandler("onClientGUIClick", GUIEditor.window[1], function( button, state ) if ( source == GUIEditor.button[1] ) then trigger() playSound( "fail.mp3" ) elseif ( source == GUIEditor.button[2] ) then guiSetVisible( GUIEditor.window[1], false ) showCursor( false ) end end ) addEventHandler("onClientGUIDoubleClick", GUIEditor.window[1], function( button, state ) if ( source == GUIEditor.gridlist[1] ) then trigger() playSound( "fail.mp3" ) end end )
  19. getResourceConfig or xmlLoadFile xmlFindChild -gets the child node xmlNodeGetAttributes -returns a table containing as keys the name of the attributes and as values the value of the attributes
  20. Pembo

    Respawn

    You could create a table containing the coords for all colshapes and then add events ("onColShapeHit") to save the coords into the players data using setElementData(). Then you would capture when a player fails and spawn them back at where they last was using getElementData() to retrieve the saved coords.
  21. Pembo

    help

    local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 15, 15 ) function hill_Enter ( thePlayer, matchingDimension ) if getElementType ( thePlayer ) == "player" then if ( ( getElementInterior( thePlayer) == 30 ) and ( matchingDimension ) ) then local nameOfThePlayer = getPlayerName ( thePlayer ) outputChatBox ( nameOfThePlayer.." entered the zone!", getRootElement(), 255, 255, 109 ) end end end addEventHandler ( "onColShapeHit", hillArea, hill_Enter ) Colshapes are created for all dimensions so you have to check within the function attached to the event if it the element that hit it is in the same dimension by checking if the argument variable 'matchingDimension' is true or false. If its true then they are in the same dimension but in your case you must check the elements interior too.
  22. When using SQL in MTA you must use it within the MTA predefined functions: dbConnect() --establish the connection to database dbExec() --execute a database query with no result dbQuery() --database query with result An example of dbExec: addEventHandler("onResourceStart", resourceRoot, function() connection = dbConnect("sqlite", "database.db") dbExec(connection, "DELETE FROM tableName WHERE dataName = ?", dataName) end )
  23. Pembo

    Respawn

    Show the code and it can be fixed.
  24. If its a 3D sound then it creates it within the MTA world meaning it will already by default lose volume as a player reaches a certain distance from it.
  25. Do you mean how to prevent a player from taking damage when they jump off something high?
×
×
  • Create New...