Jump to content

rusztamas

Members
  • Posts

    145
  • Joined

  • Last visited

Everything posted by rusztamas

  1. function planeCreate(jatekos) plane = createObject (14553, 58.7537+2, -1532.75745, 357.22136+0.25, 0, 0, 90) platform = createObject (14548, 58.75378, -1532.75745, 357.22136, 0, 0, 90) players = getElementsByType("player") if isTimer(teleportDelay) then killTimer (teleportDelay) end teleportDelay = setTimer (function() for i,p in ipairs(players) do outputChatBox ("#FFFFFFIt is not recommended to jump in a moving plane. If you are stuck up top, use the #2590CE/stuck#FFFFFF command!", p, 255, 255, 255, true) setElementPosition (p, 36.48424911499, -1532.5826416016, 351.02972412109) setPedRotation (p, 90) end, 20000, 1) end addEvent ("planeCreate", true) addEventHandler ("planeCreate", getRootElement(), planeCreate) debugscript says there is an unexpected symbol near "," (11) i just can't find it
  2. Hi! I am making a dx hud, and the elements are getting drawn on each other, i have not clue why, i'd like to find that one out in the future. I guess i need to use removeEventHandler, but i don't really know where to place it in my code. My code works like this: Player logs in, the script calls the function, which renders the scoreboard. exports.hud:render(). So as i wrote, i just saw while driving that they are getting drawn on each other, yet i have no clue why, (when i join the server, it gets drawn again) And when i place the removeeventhandler, somewhere, it sometimes work, but how do i add the event again? In not the same function? If it is not right after the function's end? I don't really understand this, i have never done stuffs like huds with renders and alike yet.
  3. i'll give it a try.... how do i make my server 64 bit btw? thank you!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! i applied the patch, as you wrote in the topic i saw the very same problem, and downloaded and installed the runtime. it works, billion thanks.
  4. yet it is unable to load the modul (126)
  5. (server 2008 r2 standart)
  6. ccv i have the same problem, but this link is broken! could you please help me?
  7. MODULE: Unable to load mods\deathmatch\modules\mta_mysql.dll (126) Hi! Back in time, i uploaded my server in an archive to google drive. Now all of them are f#cked, i had to download nearly all of them again, and put them into the directory, where the corrupted dll-s were. Still it is not able to use this module. libmysql is in the correct place. I searched for error codes about this, i found nothing.
  8. Hi! I have this little problem here, don't know why:
  9. Hi! I'd like to make a dxDraw scoreboard, but i have no idea how to get started with it. Any ideas? I'd really appreciate your help this time.
  10. rusztamas

    Ping Server(s)

    Hi! I have 3 Linux-based physical servers, that are available to use. To equalize the load between them, I have the following plan: Server #1 is the game server. Server #2 is the database server. and Server #3 will be a secondary database server. The SQL data is shared between server #2 and #3. But on server #3 other things are running too. I want to make the following script: Server #1 pings Server #2, and if it would return nil or false, or just simply a too high delay, Server #3 would do the SQL query. It may sound a bit foolish to you, but this is for practice for me. Can you help me with the function, that pings given ip addresses, and if there is packet loss or too high delay(250+ms) it would return nil or false? Yours, faithfully.
  11. Hi! I don't now if MTA is secure, and i don't know if the IP addresses could get leaked, and i don't know, if the players are sending packets to each other, or only just they communicate with the server, and the server with the other client. I want to make it secure, and safe. However, all of the logins and events get logged into our database with their IP addresses for our safety and protection, they can't get leaked anywhere. Are the players safe on the server? Are they sending packets to each other? Just because i would not like them to communicate, for our security reasons. How does it work here?
  12. Hi! I have dxDrawTextes which are getting drawn on each other and really dropping my FPS. I mean that the coordinates should stay the same, but the first one should disappear, then the other one should appear. And I have another problem as well, it says that the event is not added to clientside, meanwhile it is! And in the meta the client script starts before the server script! Server: function sendInformationToDebug() if isTimer(delay) then killTimer(delay) end delay = setTimer (function() triggerClientEvent ("recieveData", getRootElement(), state, robbery, drilling, stealthable) end, 100, 0) end addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()), sendInformationToDebug) addEventHandler ("onPlayerJoin", getRootElement(), sendInformationToDebug) Client: function recieveData(state, robbery, drilling, stealthable) if state == nil or robbery == nil or drilling == nil or stealthable == nil then data = false else data = true triggerEvent ("drawRecievedData", getRootElement(), state, robbery, drilling, stealthable) end end addEvent ("recieveData", true) addEventHandler ("recieveData", getRootElement(), recieveData) function drawRecievedData(state, robbery, drilling, stealthable) function render() local stateStatus = state local robberyStatus = robbery local drillingStatus = drilling local stealthableStatus = stealthable local X, Y = guiGetScreenSize() local myX, myY = 1600, 900 if stateStatus == 0 then dxDrawText ("Safe: closed", 500, 500, _, _, _, _, roboto, _, _, _, _, _, true) elseif stateStatus == 1 then dxDrawText ("Safe: open", 500, 500, _, _, _, _, roboto, _, _, _, _, _, true) end end addEventHandler ("onClientRender", getRootElement(), render) end addEvent ("drawRecievedData", false) addEventHandler ("drawRecievedData", getRootElement(), drawRecievedData) How it looks:
  13. thank you! i just copy pasted the line agains and i was not paying enough attention.
  14. Client: on the start of the sound there should be a blue text displayed in the chatbox, it is getting displayed. when it should end, (10s later) there should be a red text displayed, but the red text is not even getting displayed, however the serverside triggers the right event, and other stuff within that function everything works correct. drillSound = {} drillSound["path"] = "files/sounds/drill/drill.mp3" drillSound["looped"] = true drillSound["radius"] = 25 drillSound["volume"] = 10 function playDrillSound(soundX, soundY, soundZ) drillSoundEffect = playSound3D (drillSound["path"], soundX, soundY, soundZ, drillSound["looped"]) outputChatBox("#0000FF"..tostring(drillSoundEffect).."", 255, 255, 255, true) end addEvent ("drillSound", true) addEventHandler ("drillSound", getRootElement(), playDrillSound) function stopDrillSound() if drillSoundEffect then destroyElement (drillSoundEffect) end outputChatBox("#FF0000"..tostring(drillSoundEffect).."", 255, 255, 255, true) end addEvent ("stopDrillSound", true) addEventHandler ("stopDrillSound", getRootElement(), stopDrillSound) Server: function openSafeWithDrill() drillTimer = setTimer ( function() moveObject (safeDoor, timers["safeMovementTime"], positions["safeDoorOpenPositionX"], positions["safeDoorOpenPositionY"], positions["safeDoorOpenPositionZ"]) triggerEvent ("closeSafeDoor", getRootElement()) triggerEvent ("createLoots", getRootElement()) if isElement (saw) then destroyElement (saw) end triggerEvent ("stopDrillSound", getRootElement()) end, 10000, 1) end addEvent ("openSafeWithDrill", false) addEventHandler ("openSafeWithDrill", getRootElement(), openSafeWithDrill) http://i.imgur.com/6x7RkKH.png What is wrong?
  15. there must be a more simple way... onClientRender: addEventHandler ("onClientRender", getRootElement(), function() outputChatBox(tostring(drillSoundEffect)) end)
  16. Server triggers clientside, but it is not working... (server trigger: triggerEvent ("stopDrillSound", getRootElement())) drillSound = {} drillSound["path"] = "files/sounds/drill/drill.mp3" drillSound["looped"] = true drillSound["radius"] = 25 drillSound["volume"] = 10 function playDrillSound(soundX, soundY, soundZ) drillSoundEffect = playSound3D (drillSound["path"], soundX, soundY, soundZ, drillSound["looped"]) end addEvent ("drillSound", true) addEventHandler ("drillSound", getRootElement(), playDrillSound) function stopDrillSound() if drillSoundEffect then destroyElement (drillSoundEffect) end end addEvent ("stopDrillSound", true) addEventHandler ("stopDrillSound", getRootElement(), stopDrillSound) The sound gets played, but it won't stop, i tried stopSound as well but it was not successful.
  17. fonts = {} fonts["robotoPath"] = "files/fonts/roboto.ttf" fonts["robotoSize"] = 20 fonts["robotoBold"] = false fonts["robotoQuality"] = "proof" roboto = dxCreateFont (fonts["robotoPath"], fonts["robotoSize"], fonts["robotoBold"], fonts["robotoQuality"]) function showDebugs() local X, Y = guiGetScreenSize() local myX, myY = 1366, 768 dxDrawText ("test", 500, 500, _, _, _, _, "roboto", _, _, _, _, _, true) end addEventHandler ("onClientRender", getRootElement(), showDebugs) however the font is in the directory, it is not getting displayed as a roboto font.
  18. string mouseButton, string buttonState, player playerWhoClicked, float clickPosX, float clickPosY, float clickPosZ but for example if i am lucky and i can find that coordinate, (clickPosX, clickPosY, and clickPosZ) i will be never that lucky again to find that coordinate. or can i use this somehow in an other way?
  19. yes i did, sorry for the hurry-scurry and i have an other question, i don't really want to make a new topic for that, because i post a lot of things here, so... on the image above, where the errors are as well, you can se a door. i tried to find a function i think i did not find the best function for that. i'd like to make a script for example i click the door, and it opens. what should i use for that?
  20. function OBJECTS() if DOOR_1 or DOOR_2 then destroyElement (DOOR_1) end --Destroys previous elements. DOOR_1 = createObject (2949, -709.25128173828, 947.37493896484, 11.458323478699) --Creates a door, declared as DOOR_1. DOOR_2 = createObject (2949, -709.25128173828, 948.9, 11.458323478699) --Creates a door, declared as DOOR_2. setElementData (DOOR_1, "locked", true) --DOOR_1 is locked. setElementData (DOOR_2, "locked", false) --DOOR_2 is unlocked. setElementData (DOOR_1, "open", false) --DOOR_1 is closed. setElementData (DOOR_1, "open", false) --DOOR_2 is closed. end addEventHandler ("onResourceStart", getRootElement(), OBJECTS) Line 75 is the 8th line, 83 is the 16th: function ATTEMPT_LOCK_INTERACTION(CLIENT) if isElementWithinMarker (CLIENT, DOOR_1_MARKER) then if getElementData (DOOR_1, "locked") == false then if getElementData (DOOR_1 "open") == false then setElementData (DOOR_1, "locked", true) end elseif getElementData (DOOR_1, "locked") == true then if getElementData (DOOR_1 "open") == false then setElementData (DOOR_1, "locked", false) end end end if isElementWithinMarker (CLIENT, DOOR_2_MARKER) then if getElementData (DOOR_2, "locked") == false then if getElementData (DOOR_2 "open") == false then setElementData (DOOR_2, "locked", true) end elseif getElementData (DOOR_2, "locked") == true then if getElementData (DOOR_2 "open") == false then setElementData (DOOR_2, "locked", false) end end end end addCommandHandler ("ATTEMPT_LOCK_INTERACTION", ATTEMPT_LOCK_INTERACTION)
  21. function lekerdez(jatekos, parancs, jatekosnev) qh = dbQuery(db, "SELECT * FROM feltoltesek WHERE jatekosnev='"..jatekosnev.."'") result = dbPoll (qh, -1) local row = result if row then local x = tostring(result["x"]) outputChatBox (""..x.."", jatekos) else outputChatBox ("Error!", jatekos) end end addCommandHandler ("lekerdez", lekerdez) I made one with dbPoll, as you said, i found this example in an other script, but it should output an X coordinate in the chat, but it puts "nil".
×
×
  • Create New...