vallejo Posted August 12, 2016 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
aka Blue Posted August 12, 2016 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
vallejo Posted August 13, 2016 Author 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?
Recommended Posts