Jump to content

[HELP] BUG


justn

Recommended Posts

The problem is, the player cant enter the vehicle, and he doesnt get warped into it

Client:

addEventHandler("onClientGUIDoubleClick",CaptainJob_Window, 
function(b) 
    if b == "left" then 
    if source == CaptainJob_Grid then 
        Location1 = guiGridListGetSelectedItem(CaptainJob_Grid, CaptainJob_Row, CaptainJob_Location ) 
        Money_Location = guiGridListGetSelectedItem(CaptainJob_Grid, CaptainJob_Row, CaptainJob_Money ) 
        if ( Location1 ) then 
        x, y, z = unpackDestinations () 
        CaptainMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) 
        CaptainAttachedBlip = createBlipAttachedTo(CaptainMarker,9)  
        CaptainVehicle = createVehicle(472,2430.1584472656,-2298.5764160156,-0.55000001192093) 
        triggerServerEvent("warpIntoBoat",localPlayer,thePlayer,CaptainVehicle) 
        setElementVisibleTo( CaptainAttachedBlip, localPlayer, true ) 
        setElementVisibleTo( CaptainAttachedBlip, root, false ) 
        elseif not ( Location1 ) then 
        outputChatBox ( "You haven't selected a location", 255, 255, 255 ) 
            end 
        end 
    end 
end) 

Server:

function warpIntoBoat(thePlayer,CaptainVehicle) 
warpPedIntoVehicle(thePlayer,CaptainVehicle) 
end 
addEvent("warpIntoBoat",true) 
addEventHandler("warpIntoBoat",getRootElement(),warpIntoBoat) 

Link to comment

Now i tried this and it dont work.

Server:

function warpIntoBoat() 
CaptainVehicle = createVehicle(472,2430.1584472656,-2298.5764160156,-0.55000001192093) 
warpPedIntoVehicle(source,CaptainVehicle) 
end 
addEvent("warpIntoBoat",true) 
addEventHandler("warpIntoBoat",getRootElement(),warpIntoBoat) 

Client:

addEventHandler("onClientGUIDoubleClick",CaptainJob_Window, 
function(b) 
    if b == "left" then 
    if source == CaptainJob_Grid then 
        Location1 = guiGridListGetSelectedItem(CaptainJob_Grid, CaptainJob_Row, CaptainJob_Location ) 
        Money_Location = guiGridListGetSelectedItem(CaptainJob_Grid, CaptainJob_Row, CaptainJob_Money ) 
        if ( Location1 ) then 
        x, y, z = unpackDestinations () 
        CaptainMarker = createMarker ( x, y, z, "cylinder", 3, 255, 51, 102, 85, localPlayer ) 
        CaptainAttachedBlip = createBlipAttachedTo(CaptainMarker,9) 
        triggerServerEvent("warpIntoBoat",localPlayer) 
        setElementVisibleTo( CaptainAttachedBlip, localPlayer, true ) 
        setElementVisibleTo( CaptainAttachedBlip, root, false ) 
        elseif not ( Location1 ) then 
        outputChatBox ( "You haven't selected a location", 255, 255, 255 ) 
            end 
        end 
    end 
end) 

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