yukitokun1996 Posted July 11, 2015 Share Posted July 11, 2015 Help . give me a code [spawn vehicle + Auto destroy ] Bad english ! Sorry Link to comment
Calculador Posted July 11, 2015 Share Posted July 11, 2015 For your script, and what you want, you should use these funcions: createVehicle destroyElement Link to comment
amm2100 Posted July 11, 2015 Share Posted July 11, 2015 function spawncar( thePlayer ) destroyElement( vechical ) local x,y,z = getElementPosition( thePlayer ) local vechical = createVehicle( 468, x, y, z ) -- Change Here warpPedIntoVehicle ( thePlayer, vechical ) end addCommandHandler( "create", spawncar) that Script will allow players when they type /create , Sanchez will create and they will warp in it if you need another Vehicle Change 468 to your Vehicle ID @ Change Here Comment Vehicle IDs https://wiki.multitheftauto.com/wiki/Vehicle_IDs wait Please I am making the Destroy Link to comment
LaCosTa Posted July 11, 2015 Share Posted July 11, 2015 here is a code allow you to create any car with typing : /create carID , type any car ID you wish and it'll be created to you vehicle = {} function spawncar( thePlayer ,_, model) if isElement(vehicle[thePlayer]) then destroyElement(vehicle[thePlayer])return end local pX, pY, pZ = getElementPosition(thePlayer) vehicle[thePlayer] = createVehicle(tonumber(model),pX,pY,pZ) if (isElement(vehicle[thePlayer])) then warpPedIntoVehicle ( thePlayer, vehicle[thePlayer] ) outputChatBox("You successfully created " ..tostring(getVehicleName(vehicle[thePlayer])),thePlayer,255,255,155) else outputChatBox("There is an error please type a valid vehicle number",thePlayer,255,0,0) end end addCommandHandler( "create", spawncar) Link to comment
yukitokun1996 Posted July 11, 2015 Author Share Posted July 11, 2015 i need spawn vehicle with marker and if player not in vehicle too 60s is destroy Bad english ! i from in vietnam 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