-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
I don't know what that problem is. I don't think it is in here, more inside of the render core. Might be a gta bug or a bug in the script which hasn't been found out. The only way to find it, is to hard core debug it.
-
Your query looks fine. I hope the solutions will help you with solving your problem.
-
local clearing_nonexisting_peds = coroutine.create(forgetNonExistingPeds); setTimer(function() if coroutine.status (clearing_nonexisting_peds) == "dead" then clearing_nonexisting_peds = coroutine.create(forgetNonExistingPeds); end coroutine.resume(clearing_nonexisting_peds) end, 1000, 0); Replace line 112 and 113. It should recreate the coroutine when it is dead.
-
I am not sure, I am not a fan of this custom function. Afaik dxDrawMaterialLine3D rotates between the points, but because the second point is moved, I am not sure which values you have to use. So I recommend you to use dxDrawMaterialLine3D instead.
-
I help you over ~2 hours(no time), if you haven't got the awnser yet.
-
Is there always 1 data per owner? Or can there be more data per owner?
-
Show the query you are using. Solutions: You might want to use a callback, because the lua code will pause when you execute the query(if no call back). (which can cause a lot of lagg if the requested data size is very large) Save the data you collected inside of a table(as buffer). Use tickcount to decide if you re-call the mysql database or use the buffer. (which can improved your performance with 100 t/m 1000%) So if a guy is spamming/pushing the button a lot of time, your cpu usage will stay normal. Improve your query and set a: LIMIT 1000. Which will make sure that you do not overheat your database. You might not get all the results you need, but you can also request more later, see this example: https://stackoverflow.com/questions/5767479/mysql-limit-range
-
Lol, this property is for clientside. No way serverside is going to download it's own files.
-
https://wiki.multitheftauto.com/wiki/DxDrawImage3D Scroll down and add the code, from under the headline: code
-
Write one query to get the result, not 100000.
-
Make all functions unique. MarkerHit5, renderDisplay, StopHandling, HandleTheRendering And attach this addEventHandler to the marker element(of the file) instead of the root element. addEventHandler("onClientMarkerHit", check2, MarkerHit5)
-
When you are not on mobile. Show me all the content you have and show me the end result (with Photoshop/gimp), so that I can get a better idea of what you are trying to do. After that, I will give you instructions + the required information(incl. wiki links). You make your second iteration and I will give feedback with some code adjustments. Iterate, iterate, iterate etc. Easy
-
It is always recommended to check if something has been created (or not) before executing more code. if NemesisRa then -- ... else iprint("NemesisRa has not been created") end This is not good, using the same variable for different data, which will overwrite itself. Unless there is a very good reason for... NemesisRa = exports [ "slothBot" ]:spawnBot ( -2551.4892578125, 640.34375, 27.8125, 90, 312, 0, 0, NemesisRa, 23,"chasing", true )
-
There should be a warning on line 26. Because the hillArea hasn't been created yet. That happens after the resource has been started.
-
Your goal is clear, but you do not describe your problem.
-
A typo And the predefined variable source does not exist with addCommandHandlers. Use the first parameter instead. local Vehicle = createVehicle ( 470, 2485.3427734375, -1665.353515625, 13.34375 ) function weapon(player) if ( Vehicle ) then triggerClientEvent(root, 'createClientWeapon', player, Vehicle) end end addCommandHandler( "gocar", Vehicle, Weapon)
-
You are not specific enough.
-
Best scaling factor: (in my opinion) local screenWidth, screenHeight = guiGetScreenSize() local developmentScreenHeight = 1080 -- your resolution. local scaleFactor = screenHeight / developmentScreenHeight local imageSizeX, imageSizeY = 128 * scaleFactor, 128 * scaleFactor Do not scale over the X as because of the screen ratio. (except if it is for X position) With what are you filling it up? Because if it is just one colour then a rectangle is enough.
-
https://wiki.multitheftauto.com/wiki/Client_Scripting_Events#Ped_events There are no ped damage events serverside.
-
createBlip on Player for a specific Team or Group
IIYAMA replied to Zuher Laith's topic in Scripting
That depends on a lot of things. The only way to figure it out is by testing and testing with multiple players. I also do not know if the function setElementVisible works for the team element. If not, then you also have to re-loop and collecting all players. What you need to do is testing it with multiple players. There are just no other options function LlamaServicio(Player, Team) if Team == "Police" then local players = getElementsByType ( "player" ) local aclGroup = aclGetGroup ( "Police" ) for k, polices in pairs(players) do local blipvisible = false local account = getPlayerAccount(polices) if not isGuestAccount(account) then local accountName = getAccountName (account) if isObjectInACLGroup ( "user." .. accountName, aclGroup) then -- chat msg here (polices, "Backup requested, location on GPS") outputDebugString("Blip Attached! For player: " .. tostring(getPlayerName(polices)), 3) local myBlip = createBlipAttachedTo(polices, 20) setElementParent(myBlip, playerBlipRoot) setElementVisibleTo ( myBlip, root, false ) -- make it invisible for all players. (this does not have influence on new joined players.) setElementVisibleTo ( myBlip, polices, true ) -- I am not sure if it works for team players. You should test it with multiple players. blipvisible = true end end if not blipvisible then outputDebugString("I am not the police. For player: " .. tostring(getPlayerName(polices))) -- I am not the police end end -- chat msg here (player, "You called police.") end end -
createBlip on Player for a specific Team or Group
IIYAMA replied to Zuher Laith's topic in Scripting
There is also a for ... do in that code which is looping through the exact same element type. Not much of a difference.. Here you got a stripped version: (18+ only) local players = getElementsByType ( "player" ) local aclGroup = aclGetGroup ( "Police" ) for k, player in pairs(players) do local account = getPlayerAccount(player) if not isGuestAccount(account) then local accountName = getAccountName (account) if isObjectInACLGroup ( "user." .. accountName, aclGroup) then -- put your stuff. end end end -
But what does this script has to do with the glue script? Because the function setPedCanBeKnockedOffBike has no influence over the glue script.
-
Not specific enough... Where does it go wrong? This code can't tell me right away what your problem is.
-
Try the load the url after the browser white-list has been updated: https://wiki.multitheftauto.com/wiki/RequestBrowserDomains https://wiki.multitheftauto.com/wiki/OnClientBrowserWhitelistChange
