Jump to content

joaosilva099

Members
  • Posts

    199
  • Joined

  • Last visited

Everything posted by joaosilva099

  1. This happens in every server: When a stream is playing, the FPS drops. I can stay at the server FPS cap when not playing any sound (60 FPS) easlily, but when a stream is playing, the FPS drop dramatically (like from 60 to around 40). What is this related to?
  2. Hey, so, what I have today is not a problem, I just want to ask some questions... First of all, I have a server with unlimited bandwidth access, so, would I get more performance of my MTA server (talking about sync, etc...) if I set the bandwidth reduction to "none". Or it won't make a big difference? What does the bandwidth reduction setting actually "optimize" in "medium" mode? And on "maximum" mode? Thanks in advance
  3. pv = {} sp = {} spawners = { [1] = {1541.1, -1693.67, 13.55,255, 255, 255,600, 0}, } addEventHandler("onResourceStart", resourceRoot, function () for i,v in pairs(spawners) do local marker = createMarker(v[1], v[2], v[3]-1, "cylinder", 1.5, v[4], v[5], v[6], v[7]) setElementData(marker, "spawner>ID", i) addEventHandler("onMarkerHit", marker, onMarkerHit) addEventHandler("onMarkerLeave", marker, onMarkerLeave) end end) function createTheVehicle(id, posx, posy, posz, player) if(isElement(pv[player])) then destroyElement(pv[player]) end local posx, posy, posz, rotation = spawners[sp[player]][1], spawners[sp[player]][2], spawners[sp[player]][3], spawners[sp[player]][8] sp[player] = false pv[player] = createVehicle(id, posx, posy, posz + 1, 0, 0, rotation) warpPedIntoVehicle(player, pv[player]) if(getTeamName(getPlayerTeam(player)) == "Staff") then addVehicleUpgrade(pv[player], 1010) end end addEvent("crVeh", true) addEventHandler("crVeh", getRootElement(), createTheVehicle) -- function onMarkerHit(hitElement) if(getElementType(hitElement) == "player") then triggerClientEvent(hitElement, "markerHitted", getRootElement()) sp[hitElement] = getElementData(source, "spawner>ID") end end function onMarkerLeave(leftElement) if(getElementType(leftElement) == "player") then triggerClientEvent(leftElement, "markerLeaved", getRootElement()) end end
  4. pv = {} spawners = { posX, posY, posZ, R, G, B, Alpha {1541.1, -1693.67, 13.55,255, 255, 255,600} } addEventHandler("onResourceStart", resourceRoot, function () for i,v in pairs(spawners) do local marker = createMarker(tostring(v[1]), tostring(v[2]), tostring(v[3])-1, "cylinder", 1.5, tostring(v[4]), tostring(v[5]), tostring(v[6]), tostring(v[7])) setElementData(marker, "spawner>ID", i, false) addEventHandler("onMarkerHit", marker, onMarkerHit) addEventHandler("onMarkerLeave", marker, onMarkerLeave) end end) function createTheVehicle(id, posx, posy, posz, player) if(isElement(pv[player])) then destroyElement(pv[player]) end local posx, posy, posz = spawners[getElementData(client, "spawner>ID")][1], spawners[getElementData(client, "spawner>ID")][2], spawners[getElementData(client, "spawner>ID")][3] setElementData(client, "spawner>ID", false, false) pv[player] = createVehicle(id, posx, posy, posz + 1) warpPedIntoVehicle(player, pv[player]) if(getTeamName(getPlayerTeam(player)) == "Staff") then addVehicleUpgrade(pv[player], 1010) end end addEvent("crVeh", true) addEventHandler("crVeh", getRootElement(), createTheVehicle) -- function onMarkerHit(hitElement) if(getElementType(hitElement) == "player") then triggerClientEvent(hitElement, "markerHitted", getRootElement()) setElementData(hitElement, "spawner>ID", getElementData(source, "spawner>ID"), false) end end function onMarkerLeave(leftElement) if(getElementType(leftElement) == "player") then triggerClientEvent(leftElement, "markerLeaved", getRootElement()) setElementData(hitElement, "spawner>ID", false, false) end end
  5. Nevermind, it's a bug from MTA... I worked around using an older version, before they add this check for positive and negative numbers
  6. What sort of data is "negative" and "positive"? And therefore... The query is ok! I checked the db logs and it says success and it's showing the right results, but I can't use dbPoll with it on the scripts... I am using MySQL, could it be with a dll or something? EDIT: I found out, maybe "negative" and "positive" refers to the second argument on dbPoll, but it must be negative, it says on the wiki, to wait until the result is ready use -1 dbPoll(q, -1)
  7. Ok, Dealman GTFO of here if you don't want to help. You know everything so you will never need help. You ended up earning one more person that will never help you. This was happening when there were about 2 or 3 players not logged in (downloading resources from the HTTP server). I ended up solving this by myself. /lock please.
  8. the machine is the server machine. I mean the Computer where the server is running. Is it that hard to understand?
  9. Errors are not a problem, it seems to be the new players download to cause the server FPS Sync drop. WHen there are no new players downloading the things the FPS sync is normal
  10. I mean a better server machine, better hardware resources
  11. Maybe a better machine would handle it better?
  12. Yes, I can feel this happening when someone new joins and is downloading the things.
  13. So guys, hello! I am having some issues with the FPS sync of a server. I have the FPS Limit at 80 on server but it's set to 60 on the client, so each player can use /setfps <25-80> to set the limit for his own game. The problem is that sometimes (I didn't notice yet what is triggering this because it can happen with 30 players and at the same time with 15 players too) the server gets a huge FPS Sync drop (from >400 to 100~200) and every player can't even pass the 40 FPS. I don't have any idea of what's causing this, maybe the player sync interval? it's set to 150ms Regards, Joao
  14. So it's impossible with setPedStat
  15. As you know, if you complete cop missions until level 12 (I am not sure the level) you can get 150% of armour on GTA Single Player. I would like to know how to add this on MTA if it's possible. I didn't find any stat for that
  16. Ye, I knew that one, I can split Web server from MTA server, but I can't split more servers from the Core?
  17. I've seen somewhere that if you get more than 1 machine, you can use both machines power combined to run a MTA server... Could someone explain me this? Maybe I am saying bullshit or maybe I am saying it in the wrong way...
  18. you want to check if the account already exists on the register act?
  19. Not working, cancelEvent() isn't streamed between resources I think
  20. I want to give the players more damage if they were hit on the head, so if the damage event got cancelled I don't want the damage to be given... So I must use NOT! And that priority thing isn't working
  21. It should only take health if the event was not cancelled and that code does not do that
  22. Hey! I have this script in a resource: addEventHandler("onClientPlayerDamage", localPlayer, function () --if checks... cancelEvent() --end end) And in another resource I have this addEventHandler("onClientPlayerDamage", localPlayer, function (_, _, body, loss) if body == 9 and not wasEventCancelled() then setElementHealth(source, getElementHealth(source)-(loss*0.5) end end) And it's not working... I mean, even if the first resource's event gets cancelled, the second one does not dettect that cancel. I am sure it's cancelling because in another body parts it does not take health.
×
×
  • Create New...