Jump to content

IIYAMA

Moderators
  • Posts

    6,061
  • Joined

  • Last visited

  • Days Won

    208

Everything posted by IIYAMA

  1. 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
  2. Oke, show me what you got.
  3. 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 )
  4. There should be a warning on line 26. Because the hillArea hasn't been created yet. That happens after the resource has been started.
  5. Your goal is clear, but you do not describe your problem.
  6. 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)
  7. 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.
  8. https://wiki.multitheftauto.com/wiki/Client_Scripting_Events#Ped_events There are no ped damage events serverside.
  9. 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
  10. 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
  11. But what does this script has to do with the glue script? Because the function setPedCanBeKnockedOffBike has no influence over the glue script.
  12. Not specific enough... Where does it go wrong? This code can't tell me right away what your problem is.
  13. 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
  14. https://wiki.multitheftauto.com/wiki/AclGetGroup See example 2.
  15. exp_kill = get("ExpPorKill") -- no need for: nivel. Unless it is used by another resource. <setting name="*ExpPorKill" value="100" />
  16. Check if the setting is added to the meta.xml and filled in correctly. If that doesn't work, you can do something like this: (replace line 3) exp_kill = get("nivel.ExpPorKill") or 10 -- fill in a fallback value
  17. Remove removeEventHandler( "onClientRender", root, callfunction )
  18. local attachedElements = getAttachedElements(veh) if attachedElements[1] then fireWeapon ( attachedElements[1] ) end P.s. you are not attaching gun2 in your code. There is a typo.
  19. The element has to exist first before you can have interaction with it. Real world example: How can I help people on this forum, if they haven't been born yet? The answer to that is: I can not. So use: if isElement(aWarpForm) then Before you are going to have interaction with this element.
  20. You aren't executing the function `szinvaltas`. And I have also no clue why you put a function there. Also I do not understand where the variable `speed`/ speed value comes from.
  21. That is not the error/warning. But this: c.lua:5: attempt to concatenate local 'amount' (a nil value) Which makes the meaning of the issue very different. local screenW, screenH = guiGetScreenSize() local amount function asdasd() dxDrawRectangle(screenW * 0.8069, screenH * 0.5656, screenW * 0.1931, screenH * 0.0289, tocolor(0, 0, 0, 178), false) dxDrawText("Kaptál #01AC41"..amount.."Ft-ot.", screenW * 0.8063, screenH * 0.5656, screenW * 1.0000, screenH * 0.5944, tocolor(255, 255, 255, 255), 1.00, "sans", "center", "center", false, false, false, true, false) end addEvent("theclienteventname", true ) addEventHandler("theclienteventname", root, function ( amount_ ) amount = amount_ addEventHandler("onClientRender", root, asdasd) end)
  22. You can use fetchRemote to make a 'download' progress, but more in this way: fileSize / totalFileSize * 100 = additional progress.(% after a file has been downloaded) Which is more or less a file transfer progress instead of a download progress. With a transition you can make it more smooth. But it will not tell the client that a part of a file has been downloaded. See also the function downloadFile which also validate the file if it has been corrected downloaded and not edited by the client.
  23. I don't think there is a download progress indication for fetchremote. But you can use the trigger latent functions to show the client download progress once the server has downloaded the files.
  24. Nice done mate. Now get serious please. https://wiki.multitheftauto.com/wiki/Client_Scripting_Functions https://wiki.multitheftauto.com/wiki/Client_Scripting_Events https://wiki.multitheftauto.com/wiki/Server_Scripting_Functions https://wiki.multitheftauto.com/wiki/Server_Scripting_Events
×
×
  • Create New...