Jump to content

botshara

Members
  • Content Count

    83
  • Joined

  • Last visited

Posts posted by botshara

  1. Hello! Im looking for cheap vps hosting in Eu. Currently im using ovh vps, but problem starts when server gets ddosed and when ovh mitigates my vps then I need limit packets per user per seconds in iptables otherwise players just get banned by ovh firewall after downloading 1.5mb. Even so this solution is not perfect and players sometime just get dropped.

    Some days ago I found hetzner, they have almost similiar prices to ovh, does anyone here had tried hetzner vps and knows it is worth to switch? I have read that if server gets ddosed then server can be offline for some seconds if so then this is not what im looking for. Please share your experience. 

  2. I have also the same problem, but with images... After 1.5.7 client update it broke.

    In my case, It broke when load file from different resource, if load from local resource then no problem.

    -- WORKS

    http://mta/local/avatar.png

    -- BROKEN

    http://mta/cache/avatar.png

  3. This is very interesting topic, because on linux I get also much higher memory usage in comparsion with windows if I can trust what ipb resource is showing to me. If I get on linux 1,6gb ram usage then on windows i get only ~200mb with the same scripts.

  4. It would be cool if speech recognition and speech synthesis would be possible to use in MTA. It would open new horizons in creativity. This is possible in almost all CEF browsers which i have used, so probably it is also possible to implement it in MTA.

  5. Hello, Im looking for scripter who can make for me TV script. I need this script done in 2 weeks.

    Description about script:
    All data saving in mysql database and videos playing from youtube. Can place TV only where dimension > 0, only 1 TV per dimension and loads only when enter in dimension (for perfomance). GUI for selecting video from youtube and GUI opens when click on TV.

    My budget is 20 EUR. I will pay (paypal) only after I will see script working in your dev server. If you think you can do this then PM me.

    • Confused 1
  6. 20 minutes ago, MIKI785 said:

    I see now that it's not actually onClientRender that you're using, so that was never an issue.

    I don't see anything wrong with it, the issue is most likely in that 'interface' library.

    Yea, looks like problem is in interface script. Interface script store data in setElementData, and use getElementData to display data, maybe there is problem? Desync or something like that.  Bug also happens with shorter text but with smaller fps drop.

  7. 12 minutes ago, MIKI785 said:

    Well of course, those functions are not meant to be used every frame.

    Just simply store the text in a variable and use that in the render handler instead.

    
    xmlRules = xmlNodeGetValue(xmlLoadFile("commands/rules.xml")) --store the text and not the node (btw. you should check if the file exists first)
    
    function testMyGui()
    	help_window = interface:dxCreateWindow(x, y, width, height, tocolor(0, 0, 0, 125), false, "Help panel", (35/1080)*sy, tocolor(0, 0, 0, 225), tocolor(255, 255, 255, 255), nil)
    	interface:dxAddBorder(help_window, "bottom", tocolor(255, 102, 255), 1)
    	interface:setActiveGUI(help_window)
    	interface:dxSetMovable(help_window, true)
    	local tabPanel = interface:dxCreateTabPanel(0.025, 0.15, 0.95, 0.8, width*0.1521, true, help_window, tocolor(0, 0, 0, 125))
    		
    	local tabRules = interface:dxCreateTab(tabPanel, "Rules", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    
    	local RulesBox = interface:dxCreateTextWindow(0.025, 0.05, 0.95, 0.9, true, tabRules, tocolor(0, 0, 0, 100), tocolor(255,0,0,255), tocolor(0,255,0,255), false)
    	interface:dxTextWindowAddText(RulesBox, xmlRules, tocolor(255, 255, 255, 255)) --show the text
    
    	local tabOverview = interface:dxCreateTab(tabPanel, "Command usage", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    	local tabCommands = interface:dxCreateTab(tabPanel, "All comannds", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    end
    addEventHandler("onClientResourceStart", getRootElement(), testMyGui)
    

     

    still drop

  8. Hello!

    Im getting a huge fps drop when I use xmlNodeGetValue in dxDrawText. From 60 fps to 7 fps.

    Here is my code example. Btw I use library to make GUIs.

    xmlRules = xmlLoadFile( "commands/rules.xml" )
    
    function testMyGui()
    	help_window = interface:dxCreateWindow(x, y, width, height, tocolor(0, 0, 0, 125), false, "Help panel", (35/1080)*sy, tocolor(0, 0, 0, 225), tocolor(255, 255, 255, 255), nil)
    	interface:dxAddBorder(help_window, "bottom", tocolor(255, 102, 255), 1)
    	interface:setActiveGUI(help_window)
    	interface:dxSetMovable(help_window, true)
    	local tabPanel = interface:dxCreateTabPanel(0.025, 0.15, 0.95, 0.8, width*0.1521, true, help_window, tocolor(0, 0, 0, 125))
    		
    	local tabRules = interface:dxCreateTab(tabPanel, "Rules", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    
    	local RulesBox = interface:dxCreateTextWindow(0.025, 0.05, 0.95, 0.9, true, tabRules, tocolor(0, 0, 0, 100), tocolor(255,0,0,255), tocolor(0,255,0,255), false)
    	interface:dxTextWindowAddText(RulesBox, xmlNodeGetValue( xmlRules  ), tocolor(255, 255, 255, 255))
    
    	local tabOverview = interface:dxCreateTab(tabPanel, "Command usage", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    	local tabCommands = interface:dxCreateTab(tabPanel, "All comannds", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
    end
    addEventHandler("onClientResourceStart", getRootElement(), testMyGui)

     

  9. 14 minutes ago, WorthlessCynomys said:

    Use onVehicleExit and check vehicle model ID

    I need to check when player FALL OFF from the bike. For example I drive into pillar and I fall off from the bike. onVehicleExit doesnt trigger that.

     

    8 minutes ago, Zorgman said:

    ...or onPlayerVehicleExit. You will still have to rule out cases when player voluntarily exits the vehicle or when he is jacked. The last one is easy, event has a parameter called "jacker" that you can check. For the first, I'm not really sure right now... maybe set a temporary variable when player presses vehicle exit control so you can tell them apart.


    Ty bro that actually is that what i looked for.

  10. Hello, Im trying to make inventory script and I want when I press right mouse button on the item then acurs my function.

    The problem is that dx functions doesnt support onClientClick by default, I looked in forum and I found some solutions where onClientClick checks for coords, but this variant is not suitable for me because i need also check which item I pressed. Also I cant use onClientGUIClick for example by creating empty label because onClientGUIClick doesnt work when I press right mouse button.

    Any ideas?

  11. I want load data from triggerServerEvent but I get boolean in client side. I have records in db and i tested server side loop, it works and dont return boolean.

    Server side 

    function ShowTopKillers()
    	allData = {}
    	local data = dbQuery(db, "SELECT * FROM top_killers ORDER BY kills DESC LIMIT 50")
    	local result = dbPoll(data, -1)
    	
    	for ind, val in ipairs( result ) do
    		local killer = {}
    		
    		killer.nick = val.nick
    		killer.kills = val.kills
    		killer.deaths = val.deaths
    		--killer.kd = val.kd
    		
    		allData[killer.nick] = killer
    	end
    	
    	return allData
    	
    end
    addEvent("ShowTopKillers", true)
    addEventHandler("ShowTopKillers", getRootElement(), ShowTopKillers)

     

    Client side 

    allKilers = triggerServerEvent("ShowTopKillers", localPlayer)
    killerCounter = 1
    for id, killer in pairs(allKilers) do
    	local row = guiGridListAddRow ( killersScreenGridList)
    	guiGridListSetItemText ( killersScreenGridList, row, 1, killerCounter, false, false )
    	guiGridListSetItemText ( killersScreenGridList, row, 2, killer.nick, false, false )
    	guiGridListSetItemText ( killersScreenGridList, row, 3, killer.kills, false, false )
    	guiGridListSetItemText ( killersScreenGridList, row, 4, killer.deaths, false, false )
    	guiGridListSetItemText ( killersScreenGridList, row, 5, 0.69, false, true )
    	killerCounter = killerCounter +1
    end

     

  12. Hello, in trying to delete some records from  internal.db using sqlite db browser, but I got error.

    SQL

    DELETE FROM accounts, userdata
    
    USING accounts
    
    INNER JOIN userdata on (accounts.id = userdata.userid)
    
    WHERE accounts.name='somename'

    Error: Error: near ",": syntax error

    What is wrong ?

  13. Hello, I want attach a colshape to object who is moving (moveObject), when hit on colshape player die or if he was in the vehicle then vehicle explode. I need do this Client-sided but if its impossible, server-sided also will be fine.

    E: Actually I dont need make colshape I think, maybe its possible server-sided ? When hit on object ?

  14. Thanks for help, but I fixed this. I added after command '2>&1' and it showed "debug", I needed to create a new user which run a .php script, because password for that user which runed php script was false.

     

    There is any chance run a server via start paramters? Something like that
    ./mta-server.sh --IP blabla --password blabla

     

     

  15. Hello im trying to start a server via php script, but the server doesn't starting.. shell_exec is enabled and I have renamed a mta-server to mta-server.sh..

    I know that start server using root is not securely and cool, but Im just trying


     

    <?php
    if ($_GET['start'] == 'true') {
    shell_exec("echo 'rootpw' | sudo -u root -S /home/mtarp/mta-server.sh");
    echo 'Server started';
    }
    else {
        echo 'something wrong';
    }
    
    
    ?>

     

  16. addEventHandler ( "onClientRender", root,
    function ( )
    	if isPedInVehicle ( localPlayer ) then
    		local vehicle = getPedOccupiedVehicle ( localPlayer )		
    		if not vehicle then return end
    		
    		local radioID = getElementData ( vehicle, "radioID" )
    
    		if radioID and radioID >= 0 then
    			
    			local sound = getSoundsBlyat[vehicle]
    			if isElement(sound) and sound and getSoundMetaTags ( sound ) then
    				song = getSoundMetaTags ( sound )["stream_title"]
              end
    and so on .......

     

  17. Hello, Im making radio script and I want get stream title from radios, but problem is that I get very big perfomance lags when I start my radio.
    Im using onClientRender Handler and getSoundMetaTags function to get stream title. Without this function script using only ~2% CPU but with this function (getSoundMetaTags) script using ~20% CPU.

    There is any alternative using onClientRender Handler and dont get perfomance lags ?

×
×
  • Create New...