Mr.Mostafa Posted May 9, 2018 Share Posted May 9, 2018 سلام عليكم ابي لما اضغط زر يسحب من شخص سيارته ويعطيله سيارة جديدة محاولتي Vehicle = { } addEvent ( "Take:Vehiclee", true) addEventHandler( "Take:Vehiclee",root, function ( ) x,y,z = getElementPosition ( source ) if ( getElementType(element) == "vehicle" ) then destroyElement(element) Vehicle[source] = createVehicle ( 502, x, y, z ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox( "* Done you give Car.",source,0,255,0,true) end end ) Link to comment
Master_MTA Posted May 9, 2018 Share Posted May 9, 2018 1 hour ago, Mr.Mostafa said: محاولتي Vehicle = { } addEvent ( "Take:Vehiclee", true) addEventHandler( "Take:Vehiclee",root, function ( ) x,y,z = getElementPosition ( source ) if (isPedInVehicle(source) ) then destroyElement(getPedOccupiedVehicle(source)) Vehicle[source]=nil end Vehicle[source] = createVehicle ( 502, x, y, z+1 ) warpPedIntoVehicle ( source, Vehicle[source] ) outputChatBox( "* Done you give Car.",source,0,255,0,true) end ) 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