Jump to content

I need help with another script.


Recommended Posts

Well, I've been helped in the script to fix all the cars from a race server. Now, I need help creating a script that put a ramp in front of all survivors of the race.

The script that I have used to put the ramp in front of just one car, but I need one that put a ramp in front of all cars.

This is the script that I have:

*Script removed.

Can someone help me create this script?

Edited by Guest
Link to comment
function st3reo7 (thePlayer, commandName) 
for i,v in pairs(getElementsByType("player")) do 
if isPedInVehicle(v) and getElementData(v,"state") == "alive" then 
      local vehicle = getPedOccupiedVehicle(v) 
      local x, y, z = getElementPosition ( vehicle ) 
      local rx, ry, rz = getVehicleRotation ( vehicle ) 
      local stereo = createObject ( 3080, x, y, z, rx, ry, rz ) 
      attachElements ( stereo, vehicle, 0, 4, -1, 0, 0, 180 ) 
      outputChatBox( getPlayerName(thePlayer)..  " Give Ramp "  ..getPlayerName(v), getRootElement(), 255, 255, 0, true) 
       end 
    end 
end 
addCommandHandler("ramp", st3reo7) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...