Faraon, Posted August 17, 2016 Share Posted August 17, 2016 آلسلام وعليكم ورحمة الله وبركاتة اليوم انا فكرت اسوي سكربت اخذ سياره .. لاجانب وللعرب .. حدث مشكلة وانا بسوي .. كان نجحا وشغال 100% لكن بعد لما طورتة بكودات .. حدث مشكلة ومو بيعطي سيآره .. #فارجوكم افهموني الاكواد -> server <- addEvent("warpPedIntoVehicle",true) addEventHandler("warpPedIntoVehicle",root,car local Dead = {}; local ID = 411 local x, y, z = getElementPosition ( source ) Dead[source] = createVehicle( ID, x + 3, y, z ) if ( Dead[source] ) then warpPedIntoVehicle ( source, Dead[source] ) outputChatBox("* [ تم اعطائك موتر ] .",source,math.random ( 150, 255 ),255,math.random ( 222, 255 ),true) end end) Client addEventHandler("onClientGUIClick",car, function() triggerServerEvent("warpPedIntoVehicle",localPlayer) end ) Link to comment
#DRAGON!FIRE Posted August 17, 2016 Share Posted August 17, 2016 addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == car ) then triggerServerEvent ( "createVehicleForPlayer", localPlayer ) end end ) local Dead = {}; local ID = 411 addEvent ( "createVehicleForPlayer", true ) addEventHandler("createVehicleForPlayer",root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end end local x, y, z = getElementPosition ( source ) Dead[source] = createVehicle( ID, x + 3, y, z ) if ( Dead[source] ) then warpPedIntoVehicle ( source, Dead[source] ) outputChatBox("* [ تم اعطائك موتر ] .",source,math.random ( 150, 255 ),255,math.random ( 222, 255 ),true) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end Dead[source] = nil end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) destroyElement ( source ) end ) Link to comment
Faraon, Posted August 17, 2016 Author Share Posted August 17, 2016 (edited) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == car ) then triggerServerEvent ( "createVehicleForPlayer", localPlayer ) end end ) local Dead = {}; local ID = 411 addEvent ( "createVehicleForPlayer", true ) addEventHandler("createVehicleForPlayer",root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end end local x, y, z = getElementPosition ( source ) Dead[source] = createVehicle( ID, x + 3, y, z ) if ( Dead[source] ) then warpPedIntoVehicle ( source, Dead[source] ) outputChatBox("* [ تم اعطائك موتر ] .",source,math.random ( 150, 255 ),255,math.random ( 222, 255 ),true) end end ) addEventHandler ( "onPlayerQuit", root, function ( ) if Dead[source] then if isElement ( Dead[source] ) then destroyElement ( Dead[source] ) end Dead[source] = nil end end ) addEventHandler ( "onVehicleExplode", resourceRoot, function ( ) destroyElement ( source ) end ) تم .. يعطيك آلعافية ي كنق Edited August 17, 2016 by Guest Link to comment
Faraon, Posted August 17, 2016 Author Share Posted August 17, 2016 الله يعافيكـ : ) ممكن تقبل سكايب؟؟.. بعتلك طلب .. : ) 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