Jump to content

Jesseunit

Members
  • Content Count

    112
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Jesseunit

  • Rank
    Sucka
  • Birthday 09/04/1997

Details

  • Location
    the Netherlands
  • Occupation
    Experienced cardboard folder
  • Interests
    Folding cardboard

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. This should work. This snippet will create a weapon for every player though. To control the weapon's firing state you'll need to store the weapon element somehow and trigger another clientEvent when a player types the command. CLIENT addEvent("weapon:onClientCreateWeapon", true) function OnClientCreateWeapon(targetPlayer) local radius = 1 local x, y, z = getElementPosition(targetPlayer) local _, _, rz = getElementRotation(targetPlayer) local tx = x + -(radius) * math.sin(math.rad(rz)) local ty = y + radius * math.cos(math.rad(rz)) local weaponElem = createWeapon("m4", t
  2. Jesseunit

    Help

    I'm sorry but I don't fully understand your reply. Do you want an object to behave the same as a door?
  3. Like SpecT said above, you have 2 functions in your code that do exactly the same as the other 2 functions in your code. I cleaned it up for you: local function onTrailerAttach(vehicle) local driver = getVehicleOccupant(vehicle) if (driver) then triggerClientEvent(driver, "TrailerAttach", resourceRoot) outputChatBox("The load has been attached", driver) end end local function onTrailerDetach(vehicle) local driver = getVehicleOccupant(vehicle) if (driver) then triggerClientEvent(driver, "TrailerDetach", resourceRoot) outputChatBox("The load has been detached", driver) e
  4. Jesseunit

    Help

    bool setObjectProperty ( object theObject, string property, var value ) The function setObjectProperty needs 3 required arguments (theObject, property and value) to work. If you take a look at the setObjectProperty wiki page you'll see a `Required arguments` heading. Any of the below properties are supported: "mass" - float "turn_mass" - float "air_resistance" - float "elasticity" - float "center_of_mass" - Vector3D - (x, y, z) "buoyancy" - float The prefix before the variable name is the type.
  5. Are you serious man, learn to improvise instead of living off other people's answer. Anyway, the circle you're looking at is basically a full circle the only thing that is different, is that the lines start a bit higher which makes it look like it's not a full circle.
  6. https://wiki.multitheftauto.com/wiki/DxDrawCircle
  7. Yup, I don't really bother playing MTA anymore, all I'm doing is watching movies on Netflix and working on Sociuspirate.
  8. It's easier, download this resource, attach your attachment to ID 25 (Righthand) as the weapon is being held in the players' right hand, get the offsets right so it looks like the attachment is attached to the weapon. Now implement it into your script, vióla. EDIT: MTA has fixed the slope issue where if you would walk upon a hill attachments would glitch so it works even better now.
  9. That corona looks oddly familiar. Anyway... The best way to replace it is by using shaders, a documentation about how shaders work can be found on the Wiki, along with some examples. EDIT: You have to apply it to a world texture named 'coronastar' .
  10. Just tested it. The Camera freaks out and there's still no car. Hit me up on Skype, I'll help you out.
  11. He means that you'll need to use the onClientPreRender event to keep it updating, the function that you have right now will only execute it once.
  12. Here's a newer version of the code, now you can also use an element. local angle = 0 function renderCameraRotation( target, targetX, targetY, targetZ, cameraHeight, radius, speed, roll, fov ) local target = target or nil local cameraHeight = cameraHeight or 5 local radius = radius or 20 local speed = speed or 0.2 local roll = roll or 0 local fov = fov or 70 if isElement( target ) then targetX, targetY, targetZ = getElementPosition( target ) end local camX = targetX + radius * math.cos( math.rad( angle ) ) local camY = targe
  13. Thanks for the headsup, edited the quote.
  14. This can also be done with simple maths, and it looks cleaner. local angle = 0 function renderCameraRotation( targetX, targetY, targetZ, cameraHeight, radius, speed, roll, fov ) -- cameraHeight, radius, speed, roll and fov are optional arguments. local cameraHeight = cameraHeight or 5 local radius = radius or 20 local speed = speed or 0.2 local startangle = startangle or 0 local roll = roll or 0 local fov = fov or 70 local camX = targetX + radius * math.cos( math.rad( angle ) ) local camY = targetY + radius * math.sin( math.rad( angle ) )
  15. I made a similar resource a few months ago. https://forum.mtasa.com/viewtopic.php?f ... ht#p554785
×
×
  • Create New...