abu5lf Posted April 5, 2012 Posted April 5, 2012 (edited) function (theVehicle) local model = getElementModel(player) if (getVehicleType(theVehicle) == "player") then spawnPlayer ( player, 1762.1877441406, 815.47033691406, 10.41355895996914, 0, model, 0, 0 ) outputChatBox("* Successfully spawn ", player, 0, 255, 0) end end I want to go with the vehicle I have a player spawn Edited December 25, 2012 by Guest ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
X-SHADOW Posted April 5, 2012 Posted April 5, 2012 addEventHandler( 'onResourceStart', root, function( Kenix) if getElementType( Kenix ) == 'player' and isPedInVehicle( Kenix ) then spawnPlayer ( Kenix, 1762.1877441406, 815.47033691406, 10.41355895996914 ) outputChatBox("* Successfully spawn ", source, 0, 255, 0) end end) My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
abu5lf Posted April 5, 2012 Author Posted April 5, 2012 addEventHandler( 'onResourceStart', root, function( Kenix) if getElementType( Kenix ) == 'player' and isPedInVehicle( Kenix ) then spawnPlayer ( Kenix, 1762.1877441406, 815.47033691406, 10.41355895996914 ) outputChatBox("* Successfully spawn ", source, 0, 255, 0) end end) not work =( ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
X-SHADOW Posted April 5, 2012 Posted April 5, 2012 what are you trying to make here ? My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
abu5lf Posted April 5, 2012 Author Posted April 5, 2012 what are you trying to make here ? I want to go with the vehicle I have a player spawn ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
X-SHADOW Posted April 5, 2012 Posted April 5, 2012 you want if you are in a vehicle you want to spawn your self with the vehicle ? My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
abu5lf Posted April 5, 2012 Author Posted April 5, 2012 you want if you are in a vehicle you want to spawn your self with the vehicle ? This is exactly I want ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
X-SHADOW Posted April 5, 2012 Posted April 5, 2012 and can you show your full code please ? My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
DNL291 Posted April 5, 2012 Posted April 5, 2012 addEventHandler( "onPlayerJoin", root, function () x = 1762.18774 y = 815.470336 z = 10.4135589 local _vehicle = createVehicle(id, x, y, z) spawnPlayer(source, x, y, z) setElementModel(source, math.random(0,312)) warpPedIntoVehicle(source, _vehicle) setCameraTarget( source, source ) outputChatBox("* Successfully spawn ", source, 0, 255, 0) end ) Please do not PM me with scripting related question nor support, use the forums instead.
abu5lf Posted April 5, 2012 Author Posted April 5, 2012 addEventHandler( "onPlayerJoin", root, function () x = 1762.18774 y = 815.470336 z = 10.4135589 local _vehicle = createVehicle(id, x, y, z) spawnPlayer(source, x, y, z) setElementModel(source, math.random(0,312)) warpPedIntoVehicle(source, _vehicle) setCameraTarget( source, source ) outputChatBox("* Successfully spawn ", source, 0, 255, 0) end ) not work ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
DNL291 Posted April 5, 2012 Posted April 5, 2012 You set the id of the vehicle? stop just copy the code and say it does not work. Please do not PM me with scripting related question nor support, use the forums instead.
abu5lf Posted April 5, 2012 Author Posted April 5, 2012 Well Well I no longer needed to help ╔═╦╦╦╗╔╦═╦═╦═╦═╦╦╦╦╦╦╦═╦╦╦╦╗ ║║║║║╠╝║║╚╣║║║║║║║║║║║║║║║║║ ║║║║║╚╦╦═╦╦╦╦╣║║║║║║║║║║║║║║ ║║║║╠═╣╠╝╔══╝║║║║║╟╢║║║║║╟╢║ ╚╩══╩══╩═╩═══╩╩══╩╩═╩╩╩═╩╩═╝ «سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك» M7mdAl7arthy : لتواصل سكايب
X-SHADOW Posted April 5, 2012 Posted April 5, 2012 make sure its ServerSide in meta.xml My ingame nickname : Ops! -DeathMatch GameMode By Ops! : 5%
CapY Posted April 5, 2012 Posted April 5, 2012 stop just copy the code and say it does not work. Don't be an lazy ass and provide an debug, you haven't specified vehicle id here: vehicle = 411 -- Infernus local _vehicle = createVehicle(vehicle, x, y, z)
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