Jump to content

Help, Thanks


Paranoia

Recommended Posts

Hi, ive been encountering problems whenever i want to spawn a vehicle when i step on a marker and i was wondering why my cylinder marker is always floating whenever i script markers into that area, Here's the code :)) P.S Im a newbie scripter

marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
    function spawnVehicleForPlayer(thePlayer) 
    if ( source == marker ) then 
    vehicle = createdVehicle(468, getElementPosition(thePlayer)) 
    warpPedIntoVehicle (thePlayer, createdVehicle) 
end 
end 
addEventHandler("onMarkerHit", root, spawnVehicleForPlayer) 

Link to comment

marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
addEventHandler("onMarkerHit", marker, 
function ( ) 
    local nx, ny, nz = getElementPosition ( source ) 
    vehicle = createVehicle(468,nx, ny, nz ) 
    warpPedIntoVehicle ( source, vehicle ) 
    outputChatBox (' * your in the vehicle Now, Drive *', source, 255, 255, 0 ) 
end 
) 
Edited by Guest
Link to comment
  • Moderators
marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
addEventHandler("onMarkerHit", marker, 
function ( ) 
    local nx, ny, nz = getElementPosition ( source) 
    vehicle = createdVehicle(468,nx, ny, nz ) 
    warpPedIntoVehicle ( source, vehicle ) 
    outputChatBox (' * your in the vehicle Now, Drive *', source, 255, 255, 0 ) 
end 
) 

Line 5 createdVehicle = X

source = The source of this event is the marker that got hit by the element.

marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
addEventHandler("onMarkerHit", marker, 
function ( player ) 
    local nx, ny, nz = getElementPosition ( player ) 
    vehicle = createVehicle(468,nx, ny, nz ) 
    warpPedIntoVehicle ( player , vehicle ) 
    outputChatBox (' * your in the vehicle Now, Drive *', player , 255, 255, 0 ) 
end 
) 

Link to comment
marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
addEventHandler("onMarkerHit", marker, 
function ( ) 
    local nx, ny, nz = getElementPosition ( source) 
    vehicle = createdVehicle(468,nx, ny, nz ) 
    warpPedIntoVehicle ( source, vehicle ) 
    outputChatBox (' * your in the vehicle Now, Drive *', source, 255, 255, 0 ) 
end 
) 

Line 5 createdVehicle = X

source = The source of this event is the marker that got hit by the element.

marker = createMarker(2088.07031, -1629.89954, 13.54688, "cylinder", 1.7, 0, 0, 255) 
addEventHandler("onMarkerHit", marker, 
function ( player ) 
    local nx, ny, nz = getElementPosition ( player ) 
    vehicle = createVehicle(468,nx, ny, nz ) 
    warpPedIntoVehicle ( player , vehicle ) 
    outputChatBox (' * your in the vehicle Now, Drive *', player , 255, 255, 0 ) 
end 
) 

Btw how to fix my cylinder always floating everytime i script it :) Thanks in advance
Link to comment
Max doesn't want to stop helping people in a wrong way for sorry, i would suggest removing his content creation right for some weeks.

and are you the owner of the website ? [ i dont think so ]

also i'm sure my code will work just forgot to fix the createVehicle remove the d ,

Edited by Guest
Link to comment
Max doesn't want to stop helping in a wrong way for sorry, i would suggest removing his content creation right for some weeks.

and are you the owner of the website ? [ i dont think so ]

also i sure my code will work just forgot to fix the createVehicle remove the d ,

oh yeah warp the marker into the vehicle and output to the marker, perfect. :lol:

Link to comment
Max doesn't want to stop helping in a wrong way for sorry, i would suggest removing his content creation right for some weeks.

and are you the owner of the website ? [ i dont think so ]

also i sure my code will work just forgot to fix the createVehicle remove the d ,

oh yeah warp the marker into the vehicle and output to the marker, perfect. :lol:

Exactly what i wanted to say :lol:

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...