Jump to content

SpecT

Members
  • Posts

    656
  • Joined

  • Days Won

    9

Everything posted by SpecT

  1. I don't know if there is a better way to do it but you could put a longer period between the checks like 5-10 seconds cuz this 1 second is quite frequently (in my opinion). Other than that it shouldn't cause lag as it's not a complex function with many operations.
  2. Welcome to the forums, The reason you get kicked is because the server doesn't allow you to use "NetLimit" software. The solution is to uninstall any software on your PC which is a net limiter. You can read more information about it HERE. PS: Moved the topic to an appropriate category as this is not a server kind of problem but a client one.
  3. Hey, I don't know if you uploaded the latest version of the script but the lines from the errors aren't matching the ones in the script you attached. For example line 53 is a commented one "-- Desligue as luzes antes que a animação comece".
  4. SpecT

    CD16 Error

    It seems you have tried the most common methods to solve this problem (CD16) although you didn't succeed... If it ONLY happens for one specific server you could try with contacting their support and ask them if there is something blocking your IP from their side.
  5. @FernandoMTA A custom chatbox with your preferences is always an option.
  6. Hey, Plese, don't bump old topics! Create a new topic to get help regarding your problem.
  7. I prefer this useful function for such stuff: function getPlayerFromNamePart(name) if (name) then for _, player in ipairs (getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(tostring(name):lower(), 1, true) then return player end end end end Then it will be like this: getPlayerFromNamePart(guiGridListGetItemText(gridOpenSenior, guiGridListGetSelectedItem(gridOpenSenior), 1)) PS: This function is used when you need to find a player by a part of his nick (i.e. in a command for something).
  8. Hey, You can use guiGridListAddRow to add a row and row data instead using the guiGridListSetItemText. This should work: for _, player in ipairs(getElementsByType("player")) do setTimer(guiGridListAddRow, 100, 1, playerList, getPlayerName(player):gsub("#%x%x%x%x%x%x", "")) end BTW if there are many players it's not really good (in performance aspect) to create timers when adding them in the gridlist like this.
  9. SpecT

    First Person Mod

    Welcome to the forums! There are several resources for first-person cam feature on the community site. You can search here: https://community.multitheftauto.com/index.php?p=resources To find the first-person resources search for "firstperson" or just "person" and it will find them all. There are many resources you can find. Good luck!
  10. Server: function createveh() testveh = createVehicle(500, -1497.548828125, 2576.759765625, 56.061462402344, 0, 0, 357.63516235352) setVehicleDamageProof(testveh,true) bx, by, bz = getElementPosition(testveh) testmarker = createMarker(bx, by, bz, "cylinder", 10, 0, 255, 0, 255) testmarker2 = createMarker(bx, by, bz, "cylinder", 5.5, 255, 0, 0, 255) attachElements(testmarker, testveh) attachElements(testmarker2, testveh) setTimer(function() -- using a timer to wait the client to load the script triggerClientEvent(root, "getMarkers", root, testmarker, testmarker2) end, 1000,1) end addEventHandler("onResourceStart", resourceRoot, createveh) Client: local testmarker local testmarker2 function getMarkers(marker1, marker2) testmarker = marker1 testmarker2 = marker2 end addEvent("getMarkers",true) addEventHandler("getMarkers", root, getMarkers) function markerHit() if source == testmarker then outputChatBox("just hit marker 1") elseif source == testmarker2 then outputChatBox("just hit marker 2") end end addEventHandler("onClientMarkerHit", root, markerHit) *This is just an example, could be done better Note: This is not so secure way to do it tho. Remember to not fully trust what the client sends!
  11. You can see here that there is an issue with attaching elements for the onMarkerHit event. The issue has been on for many years and yet it's still not fully solved. It still kinda works tho but only for 1 marker. I don't know what exactly you want to do with those markers but there could be other ways of achieving what's on your mind. Unfortunately you can't rely on this method if you want to attach 2 or more markers to a vehicle. EDIT: Nvm found a solution. Send both of the markers to the clients (after you create and attach them) and then manage the marker hit with onClientMarkerHit.
  12. SpecT

    Error [CD09]

    Glad it helped! Have fun!
  13. SpecT

    Error [CD09]

    Well, you can read some information about the "net limiter" software here. You also already got kicked from a server that doesn't allow such software (VF #33). Best thing you could do is to uninstall this program as it is going to cause you problems with many servers.
  14. SpecT

    Error [CD09]

    Welcome to the forums! Your problem seems to be network related. Have you done any changes to your network settings lately? Open a command prompt with administrator rights and execute ipconfig /flushdns If you haven't already restarted your router now is the time to do it. Do you have any firewall or antivirus with a firewall installed? Edit: I just saw you have Kaspersky AV and Kaspersky Secure Connection (VPN) installed. If the VPN functionality is enabled it migth cause an issue. Not all servers allow using a VPN.
  15. On the rented server there seems to be some kind of a delay between zombie's movement and on the local one they follow you without stopping. It's like the server is being overloaded or something (doubt that it's only from the zombie script). Have you tested the script on your local server with this many zombies as the first part of the video?
  16. It seems like a network problem. It could be: - your ISP blocking your connection to the server for some reason - try using VPN (if the server allows it) - a firewall installed on your PC - try with disabling if you have one - the server has blacklisted IPs and yours is one of them (less likely) Some other stuff to try: - restart your router - run ipconfig /flushdns in a command prompt with administrator rights
  17. Hello, Please don't bump old topics but create a new one to get adequate help for your problem.
  18. For the players within colshape: outputChatBox("text", thePlayer) For everyone (but OUTSIDE the loop): outputChatBox("text for everyone", root)
  19. Yes, I see that but imagine that there are 100-200 or maybe even more vehicles all around the map and you do a loop through them every 5 seconds to check whether they are underwater or blown. I'm not sure if this is the problem you are looking for but you can give it a try by setting a longer period for those checks. You could try to debug it by putting outputChatBox("checking vehicles...") in this function. CAUTION: It will spam your chat as it runs every 5 seconds! This way you will know if the lag starts after the function was executed. You can try this method for the other functions.
  20. On this line: setTimer(pojazdywoda, 5000, 0) It's set to run every 5000 ms (5 seconds). As I can see it has checks for existing vehicles, repair/respawn and teleport them. If the vehicles become a lot it could cause a huge lag as the timer runs the function every 5 seconds. You could try to make it like per 1-5 minutes. I don't know why such functionality should be run every 5 seconds.
  21. Oh, sorry! I thought you had missing stuff. About the saving here is how it will happen: setAccountData (account, "weaponID7", getPedWeapon (source, 7)) if getPedWeapon(source, 7) == 37 then -- if the player has flamethrower setAccountData (account, "weaponAmmo7", getPedTotalAmmo (source, 7)/10) else setAccountData (account, "weaponAmmo7", getPedTotalAmmo (source, 7)) end --and the rest of the code... You won't have to edit anything on the load part as the flame ammo is already divided and it should be all good.
  22. Is your plan to save all the weapons and their ammo or just the weapon and its ammo on 7th slot ?
  23. Hmm, then try with guiSetInputMode("no_binds") where you show the panel and guiSetInputMode("allow_binds") where you hide it
  24. Is your login panel made with DX functions/lib ?
  25. Replace the FPS line in the table with this to prevent the errors. { name = "FPS", width = 40, data = function (element) return getElementData ( element, "FPS" ) or "N/A" end }, It doesn't show the FPS at first because the player just joined and it will take some time to start measuring it. So if there is no value set for the data "FPS" then it will show "N/A" instead.
×
×
  • Create New...