Multi Posted May 11, 2014 Share Posted May 11, 2014 warpPedIntoVehicle not working why?? Client: addEventHandler("onClientGUIDoubleClick",doBusow, function(b) local player = getLocalPlayer() if b == "left" then local selected = guiGridListGetItemText(doBusow, guiGridListGetSelectedItem(doBusow), 1) if selected == "1889" then triggerServerEvent ("bus", getLocalPlayer(), player) end end end ) server: addEvent ("bus", true) function auto(hitElement) autob = createVehicle (431 ,-81.970573425293, 1080.3699951172, 19.7421875, 0, 0, 010) setElementData(autob, "aut", true) warpPedIntoVehicle (player, autob) end addEventHandler ("bus", getRootElement(), auto) Debug: Bad argument warpPedIntoVehicle... Link to comment
Castillo Posted May 11, 2014 Share Posted May 11, 2014 warpPedIntoVehicle (player, autob) "player" is not defined anywhere in your script, which is what causes the error. Look careful to your function arguments, there's the answer. Link to comment
Karuzo Posted May 11, 2014 Share Posted May 11, 2014 Ofcourse, since you didn't defined player somewhere. Change line 5 from the server-sided file to : warpPedIntoVehicle(hitElement,autob) //Edit: Aw Solidsnake Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now