Jump to content

rtx

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by rtx

  1. setRadioChannel may be triggering 'onClientPlayerRadioSwitch'! Actually from the looks of it, I would say it definitely triggers that event.
  2. Spoilers only work in certain vehicles.
  3. You can only pass 2^31-1 bit integer arguments in the math class. This means the maximum number you can represent is: 2147483647 You're getting a negative value because you're getting an integer overflow, meaning the value you're trying to represent is higher than the value I've just mentioned and therefore the bit signal is affected. The solution for your problem is simple (assuming you really need a number that high): local a = "" for k = 1, 12 do a = a .. tostring(math.random(0,9)) end
  4. Notice that the event's element is the root element, NOT the player who hit the marker. -- Client: triggerServerEvent("hajsy", localPlayer, kasa)
  5. rtx

    Text stuff

    local maxLen = 8 -- maximum length local a = "Your string here" if #a > maxLen then a = string.sub ( a, 0, maxLen ) .. " ..." end
  6. You could loop through a list of models when your resource starts and check if the model is lowLOD by doing something like: local lowLOD = {} local obj = createObject ( 69, 0, 0, 0 ) for k=A, B do setElementModel ( obj, A ) if getLowLODElement ( obj ) then lowLOD[A] = true end end destroyElement ( obj ) Not sure if this works - in any case, hope it helps.
  7. use the event: "onClientSoundStarted" to get and store the sound element when the map's song starts playing and then handle it as you'd like.
  8. Use these functions: createObject () moveObject ()
  9. rtx

    Objects view

    Have you tried freezing the player until he becomes the camera's target again? (with a little delay so the objects are streamed in again).
  10. You need to make the objects client side. After you verify that the player who has hit the colshape is indeed allowed to open the gate you need to trigger a client event. triggerClientEvent ( player, "yourOpenTheGateEvent", player ) A better way to do it would be to make it fully client sided. For that you could store the player's login info when he logs in/ out client side (by using triggerClientEvent upon onPlayerLogin/onPlayerLogout).
  11. You can: -- cancel the event: "onClientChatMessage" -- and make it output your censored message with outputChatBox () -- use string.gsub to find and replace the "bad words"
  12. Consider using shaders to replace an object's texture. Would give it a 3D look.
  13. These are really cool, good job.
  14. Make sure you're taking the cursor's relative position and width/height into attention.
  15. rtx

    Ped damage

    Could you show us the code that makes the ped shoot?
  16. rtx

    Car handling

    Have you tried messing around with - dragCoeff, tractionMultiplier, tractionLoss and tractionBias?
  17. Have you declared the variable 'p' ?
  18. rtx

    dxDraw Piority

    You have to draw what you want underneath first. dxDrawText ( "under" ) dxDrawText ( "max_pri" ) If you use post_gui this will not have any effect, unless they're both post_gui
  19. getResourceInfo () -- or, it depends on what you're aiming for.. xmlLoadFile () xmlNodeGetChildren () -- etc
  20. https://wiki.multitheftauto.com/wiki/Dx ... rialLine3D "faceTowardX/Y/Z: The direction the front of the line should face towards. If this is not set, the front of the line always faces toward the camera."
  21. You could create the objects client-side and then set their dimension to the local player's (client-side).
  22. rtx

    About EditBox

    I believe that's not possible. But try: guiCreateStaticImage ( 0, 0, 64, 64, "yourimage.jpg", false, yourEdit )
  23. rtx

    Hunter reach script!

    addEvent ( "onPlayerPickUpRacePickup", true ) addEventHandler ( "onPlayerPickUpRacePickup", getRootElement(), function ( id, type, model ) if type == "vehiclechange" and tonumber(id) == 425 then -- your message outputChatBox ( "The hunter has been reached!" ) -- if you want the player's name use 'getPlayerName ( source )' as the source is the player who picked that pickup up end end )
  24. Use 'getRealTime()' otherwise 'getTickCount()' would return the machine's runtime. (That would work just fine if you want the countdown to be relative to player's joining)
×
×
  • Create New...