vallejo Posted August 12, 2016 Share Posted August 12, 2016 Este es el código, lo tengo del lado del client: Error: function vehicle() if getElementType(localPlayer) == "player" then if isPedInVehicle(localPlayer)==true then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(localPlayer) veh = createVehicle(462, x, y, z) warpPedIntoVehicle(client, veh) end end Link to comment
aka Blue Posted August 12, 2016 Share Posted August 12, 2016 warpPedIntoVehicle(localPlayer, veh) Ah y fíjate en esto: Note: Client side IsPedInVehicle can be unreliable. Solution is to use: not getPedOccupiedVehicle(ped) Lo que te recomienda/obliga usar es: if not getPedOccupiedVehicle( localPlayer ) then Sustituyendo el isPedInVehicle Link to comment
vallejo Posted August 13, 2016 Author Share Posted August 13, 2016 function vehicle() if getElementType(localPlayer) == "player" then if not getPedOccupiedVehicle( localPlayer ) then return end if isElement( veh ) then destroyElement( veh ) end local x,y,z = getElementPosition(localPlayer) veh = createVehicle(462, x,y,z) warpPedIntoVehicle(localPlayer, veh) end end addEventHandler("onClientGUIClick", Obtener,vehicle, false) -- Boton cerrar No me funciona porque? Link to comment
Recommended Posts