Jump to content

Tails

Members
  • Posts

    740
  • Joined

  • Days Won

    16

Everything posted by Tails

  1. It could mean a 100 different things if you don't show us some code. You can concat tables with table.concat. For e.x.: local a = {"a", "b", "c"} print(a[1]..", "..a[2]) --> "a, b" print(table.concat(a, ", ")) --> "a, b, c"
  2. You have to post the rest of the code. Where you're setting the element data and where you're using asdfg.
  3. remove local from radlinks and radrechts in your function local radLinks, radRechts function radExit() local Vehicle = getVehicleController(source) radLinks, radRechts = getVehicleComponentRotation(Vehicle, "wheel_lf_dummy"), getVehicleComponentRotation(Vehicle, "wheel_rf_dummy") setVehicleComponentRotation(Vehicle, radLinks) setVehicleComponentRotation(Vehicle, radRechts) end addEventHandler("onVehicleExit", getRootElement(), radExit)
  4. There's nothing you can do. What you can do is add a small timer to when the player's screen will be visible (you can use fadeCamera) and freeze the player temporarily so they don't fall through the ground.
  5. local stream local volume = 1 function CambiarEstacionOnline(cmd,url) if (url) then if (isElement(stream)) then stopSound(stream) end stream = playSound(url) setSoundVolume(stream, volume) end end addCommandHandler("radio",CambiarEstacionOnline) function muteStream() if (isElement(stream)) then volume = volume == 1 and 0 or 1 setSoundVolume(stream, volume) end end addCommandHandler("mute",muteStream) I hope this is what you were looking for. I have a really hard time understanding you.
  6. Would be nice if you told people what you did to fix it. Now you're just wasting everyone's time reading this topic.
  7. Yeah, you could edit the original resource. https://github.com/multitheftauto/mtasa-resources/blob/master/[gameplay]/playerblips/playerblips.lua Under line 32 add another line: blip[plr]:setVisibleDistance(50) replace the number with anything you like.
  8. setElementParent(towTruck, nil)
  9. Make it client side and exclude the local player when you're creating the blips for the players Also use https://wiki.multitheftauto.com/wiki/SetBlipVisibleDistance to set the visible distance
  10. try this local marker2 = createMarker(1215.326953125, 6.1982421875, 999.921875, "cylinder", 1.2, 255, 10, 10, 0) setElementInterior(marker2, 2) setElementDimension(marker2, 10) mensagem2 = function(thePlayer) if source == marker2 then outputChatBox("#C71585Você deseja um boquete por #FF69B4R$ 100,00#C71585, meu bem? Digite #FF69B4/boquete!", thePlayer, 255, 255, 255, true) end end addEventHandler("onMarkerHit", getRootElement(), mensagem2) what is 1_5_0? you probably want to add the player there also the event will return the marker as the source so you can just compare it with marker2 instead of using isElementWithinMarker.
  11. https://community.multitheftauto.com/?p=resources&s=details&id=15040 Repost of my very own fireworks script. Didn't even credit me and put his own name in the meta file. He also posted a lot of other scripts which I doubt are his. Original: https://community.multitheftauto.com/index.php?p=resources&s=details&id=10628 DONE
  12. You can put a process line between the player and the explosion and check for collisions https://wiki.multitheftauto.com/wiki/IsLineOfSightClear
  13. Tails

    Binds

    You could do something like this local inputEnabled = false addEventHandler("onClientKey", root, function() if (inputEnabled) then cancelEvent() end end) You can just toggle the inputEnabled var in your script
  14. Tails

    Binds

    You will be with onClientCharacter
  15. Tails

    Binds

    Cancel this event addEventHandler("onClientKey", root, function() cancelEvent() end)
  16. Tails

    Binds

    You can use "no_binds" as the argument and "allow_binds" to toggle binds back on you may also want to cancel the onClientKey event.
  17. Tails

    table.concat

    no, but ... just contains all the arguments, you can do args = {...} then do table.concat(args[1], " ") but better would be to use the global var 'arg' to do this: local questionText = table.concat(arg[1], " ") local answerText = table.concat(arg[2], " ") hope this helps
  18. Tails

    dx GUI

    1. use the onClientClick event to detect mouse clicks (check the wiki) 2. within that event you can check for the mouse position (arg 3 and 4) or you can get it yourself with getCursorPosition() and multiplying the x and y by the your screen size (guiGetScreenSize) 3. check if the position is within your button's dimensions (mx > x and mx < x + w and my > y and my < y + h)
  19. Lua is one of the easiest languages you can learn.
  20. Tails

    [Help] GUI Edit

    https://wiki.multitheftauto.com/wiki/GuiEditSetCaretIndex
  21. Hello @specahawk, we've been trying to use this to handle all of our gui on our server, with some success however, I have some issues with it. When I use baka to create new gui elements in another resource there's no way for it to know when the other resource has stopped. Of course I could just pass the resource name as an argument and use onClientResourceStop, but it would be nice if it was passed as a hidden argument or something or maybe there's already something there that would help deal with this issue? The comments in your code on GitHub didn't make a lot of sense to me. Also, something else I've noticed, not sure if it's a bug or a missing feature but it seems that you can't pass tables like below. You'll get a tail call warning/error. local dx = bakaGaijin("dxx").dx local win = dx.window("my window", 0, 0, 600, 225) win.setStyle({ color = tocolor(255, 0, 0, 255), bgColor = tocolor(0, 0, 0, 175) }) I had to add an alternative syntax, win.setStyle("bgColor", tocolor(0, 0, 0, 175)) which of course works fine. Thanks for writing this wonderful thing I'll still be using it but it would be nice to see these issues resolved.
  22. He was only correcting his first sentence "I am new on this server".
  23. go to your server.conf in mta\server\mods\deathmatch and look for password and remove it there.
  24. Something else must be off in your script. For example the way you're drawing the GUI, the positions may be off, or you might have to adjust the mouse pos accordingly. Show us how you're drawing the stuff, in e.x. the positions. Multiplying the positions by the screen size makes it as accurate as it can be. The relative positions that getCursorPosition gives you are just values between 0 and 1, they're fixed they never change. Each pixel you move to will have the same float. It's not a matter of accuracy.
×
×
  • Create New...