Jump to content

_Ace

Members
  • Posts

    67
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by _Ace

  1. colshapes works like a invisible marker, example code if you wanna test: local cj=createColSphere(2495.09448, -1679.98962, 13.33878, 5) function coltest(element) if source==cj and element==localPlayer then outputChatBox("cj house") end end addEventHandler("onClientColShapeHit", cj, coltest) it creates a colshape in front of cjs house (clientside). anyway you could do it without markers or shapes, like you said, but I think the loop that reads the table should be in a slower timed function like a 300-500ms setTimer, onClientRender will check tables/positions much more times per second = slower, you can use the onClientRender to show the text, and a slower timer to check the item table/player position
  2. depends if those objects/items are serversided o clientsided, if the system is 100% client it will affect fps only = depends on the clients pc, if you need to trigger server events or request information from the server then you need to do it efficiently, maybe create a colshape within the object, then a loop isn't necessary, the event (onColShapeHit / OnClientColShapeHit) will do the work for you, anyway there are many ways to do with without lagging the player or the server
  3. this? https://community.multitheftauto.com/index.php?p=resources&s=details&id=11836
  4. you need to add a comma , after each job.. because its a table like so: jobs = { {name = "Los Santos Delivery",reward = 4500,truck = 403,trailer = 435,x = 2104.6611328125,y = -2086.919921875,z = 13.546875}, {name = "San Fierro Delivery",reward = 7500,truck = 515,trailer = 591,x = -1726.4620361328, y = -79.842475891113,z = 3.5546875} } notice the comma after 13.546875}
  5. vc deve ter usado esse comando em um script server side, setclipboard só funciona clientside
  6. yes it is possible yourimg=guiCreateStaticImage ( your gui image... ) addEventHandler("onClientGUIClick",yourguibox, function() if source==yourimg then outputChatBox("test") end end) *it will detect the click as a square around the image if its png
  7. you mean skin running? sprinting? ._. use onClientPedStep or a timer and getPedControlState with "sprint" argument if you mean script running in clientside use triggerClientEvent
  8. In the resource dynamic_lightning_nightmod edit the file c_nightmod.Lua line 39 it is: local clearList = { "sl_dtwinlights*","nitwin01_la","sfnite*","vgsn_nl_strip","vehicleshatter*","vehiclescratch64", "blueshade*","coronastar*","shad_exp"} edit to local clearList = { "vehicleshatter*","vehiclescratch64"} it is "list of the world textures that will be disabled" as the resource says, you can try to re add or remove the others, I left the ones with "vehicle", I tested and the lampposts are now lit but kinda dimmed, you can later saturate (I think) the lampposts with the same shader by Ren
  9. I tested it and indeed it does affect everything outside above and below the code (server side, after using the other function with randomseed) also trying to use local math.randomseed(getTickCount()) gives and error and the script doesn't load
  10. getTickCount don't take arguments so the parentheses are empty, to check if a specific mta function take arguments, see the "syntax" part in the wiki about the randomseed it is using the current milliseconds of the server so it is the same of changing argument in math.random() every time a millisecond pass, it will make the random much less predictable, more details in the Lua site, scroll to randomseed in http://Lua-users.org/wiki/MathLibraryTutorial
  11. add a random seed https://en.wikipedia.org/wiki/Random_seed without a seed everytime you run the resource you will get the same sequence of skins/spawns Using the server tick count as seed is a way of doing it, try this: function spawnPoints (player) math.randomseed(getTickCount()) local x,y,z,r = unpack(spawnCoords[math.random(1,#spawnCoords)])
  12. _Ace

    [Help] Source

    I think you need to register the event, use addEvent("onLogin",true) on line 2, also Im not sure how you are using triggerClientEvent, if it will fire for all players or only the source of (?), you need to check it, I tested it inside a command and firing at resource root and its working
  13. line 1 change the Z position to 9.9203125 or make a bigger marker, if its base is below ground it wont trigger onfoot (tested) change line 4 and 6 to player in isPedOnVehicle, localPlayer is clientside only, also ==true is not needed
  14. use https://wiki.multitheftauto.com/wiki/GuiFocus guiFocus(youreditbox)
  15. entao o "objeto" é um player/skin? se for era pra ele cair normalmente sozinho, pq player ou ped/npc tem gravidade no jogo, mas se por algum motivo nao ta caindo usa https://wiki.multitheftauto.com/wiki/SetElementVelocity ou https://wiki.multitheftauto.com/wiki/SetElementPosition até chegar ao nivel do chão https://wiki.multitheftauto.com/wiki/GetGroundPosition se for de fato um objeto usa os exemplos do meu primeiro post, alguns objetos tem gravidade no jogo, mas quando spawnea, algo precisa encostar neles pra começarem a cair.. isso tbm se resolve com script
  16. explica melhor, oq entendi é que vc precisa simular gravidade no objeto se for isso vai ter que mover o objeto manualmente até o chao https://wiki.multitheftauto.com/wiki/GetGroundPosition ou mais facil "cola" https://wiki.multitheftauto.com/wiki/AttachElements um elemento con gravidade, por exemplo um veiculo pequeno e ele vai cair junto, tudo isso depende de quantos objetos é, o tamanho etc
  17. tem varios jeitos de fazer isso, pode ser com um if pra ver se o player ta com a skin id 0 e se tiver seta a outra skin, se for uma skin que nao seja a 0 seta a 0.. vai usar isso: https://wiki.multitheftauto.com/wiki/OnPlayerMarkerHit https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/SetElementModel
×
×
  • Create New...