Doongogar Posted November 20, 2021 Share Posted November 20, 2021 estou tentando fazer um mod que cria uma bike sem colisão e freezada em certa coordenada e quando o player entra nela cria outra bike no mesmo lugar como se fosse um marker de cria veiculo mais eu não sei como posso especificar a bike na segunda função com o evento 'onPlayerVehicleEnter' alguem porfavor ajuda ai codigo abaixo: function aluguelBike(source) bmx = createVehicle(481, -2412.3178710938, -599.50421142578, 132.1000011111111) setElementRotation(bmx, 0, 0, 127.30328369141) setElementFrozen(bmx, true) setElementCollisionsEnabled(bmx, false) end addEventHandler("onResourceStart", root, aluguelBike) function PegarBike(source) removePedFromVehicle(source, bmx) local bmx2 = createVehicle(481, -2412.3178710938, -599.50421142578, 132.1000011111111) setElementRotation(bmx2, 0, 0, 127.30328369141) warpPedIntoVehicle(source, bmx2) end addEventHandler("onPlayerVehicleEnter", root, PegarBike) Link to comment
Other Languages Moderators Lord Henry Posted November 22, 2021 Other Languages Moderators Share Posted November 22, 2021 Deixe o bmx = createVehicle... fora da função. 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