Jump to content

NadhmiNK

Members
  • Posts

    8
  • Joined

  • Last visited

NadhmiNK's Achievements

Newbie

Newbie (4/54)

0

Reputation

  1. is there anyone can help me?
  2. Hi so i was wondering, if you notice when u go to the airport and and fall vertically to the ground from a great distance, your vehicle will basically get no damage. I thought that the object used didn't allow getting damage ( for instance id 5002 ) but sadly i was wrong. So, i'm asking if such thing can be accomplished via scripting. I don't want something like: setVehicleDamageProof(vehicle, true) I just want the players' vehicles to avoid getting damage when falling to the ground ( model 6959 for example) I tried onClientVehicleCollision but couldn't do it. Any help is appreciated
  3. Thank you, works perfectly.
  4. Works, thanks. BUT, it shows the health bar for every vehicle in the map whereas i only want it for the players' vehicles (ped's occupied vehicle). Can you help me with that?
  5. Hi So, what i'm trying to accomplish is pretty simple but i can't seem to do it . I want to show a healthbar over other players' vehicles. Anywat, I've made this simple script: addEventHandler( "onClientRender", root, function( thePlayer ) local vehicle = getPedOccupiedVehicle(thePlayer) local x, y, z = getElementPosition( vehicle ) local sX, sY = getScreenFromWorldPosition( x, y, z ) local health = math.floor( getElementHealth( vehicle )/10) local Rhealth = 50 local lineLength = 56 * ( health / 100 ) if health < 25 then health = 0 else math.floor( getElementHealth( vehicle )/10) end if isElementOnScreen( vehicle ) then if sX then dxDrawText( health, sX, sY ) dxDrawRectangle( sX-32, sY-82, 60, 14, tocolor( 0, 100, 0, 120 ) ) dxDrawRectangle( sX-30, sY-80, 56, 10, tocolor( 0, 220, 0, 120 ) ) dxDrawRectangle( sX-30, sY-80, lineLength, 10, tocolor( 0, 220, 0 ) ) end end end ) But it doesn't act as any other floating health bar (that one witch is on top of every player's car). I can see my own car's bar but i can't see other's ones (same thing with other players) So, can anyone can help me out fixing this script, or give me another fully working one Thnx;
  6. Thanks guys, did the trick
  7. HI So, i want to disable the collision of the all the object with the same id (ex: 8558) when the map starts. I tried this? setElementCollisionsEnabled ( 8558, false ) Any help is appreciated
  8. Hi I couldn't seem to work this out Firstly, i'm making a race map. So, i lowed the gravity ( it's a fall, z=300) and i want the gravity to be back to normal (0.008) when the car hits the floor. Can you help me out? Thanks.
×
×
  • Create New...