αвυ-wαleed Posted February 12, 2014 Posted February 12, 2014 ابغى تعديل على الكود الحين يدخل الماركر يعطيني سيارة في المكان المحدد وانا ابقى في الماركر ابغى اركب السيارة يعني ينقلني داخل السيارة وابغى اذا انفجرت السيارة تتصلح تلقائي vehicle = {} local marker = createMarker (-3614.9025878906,-3020.1550292969,94.224273681641, "cylinder", 2,0, 0, 255,255) addEventHandler("onMarkerHit",marker, function(player) if (getElementType(player) == 'player' ) then createVehicle ( 411, -3178.8000488281,-3003.8000488281,5 ) end end)
فاّرس Posted February 12, 2014 Posted February 12, 2014 (edited) -- Server Side # vehicle = {} local marker = createMarker (-3614.9025878906,-3020.1550292969,94.224273681641, "cylinder", 2,0, 0, 255,255) addEventHandler('onMarkerHit',marker,function(player) if ( getElementType(player) == 'player' ) then if isElement(vehicle[player]) then destroyElement(vehicle[player]) vehicle[player] = nil end vehicle[player] = createVehicle ( 411, -3178.8000488281,-3003.8000488281,5 ) warpPedIntoVehicle(player,vehicle[player]) end end ) addEventHandler('onVehicleDamage',resourceRoot,function() if ( getElementHealth( source ) <= 251 ) then fixVehicle(source) end end ) addEventHandler('onPlayerQuit',root,function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end ) Edited February 12, 2014 by Guest
al-Kobra Posted February 12, 2014 Posted February 12, 2014 -- Server Side # vehicle = {} local marker = createMarker (-3614.9025878906,-3020.1550292969,94.224273681641, "cylinder", 2,0, 0, 255,255) addEventHandler('onMarkerHit',marker,function(player) if ( getElementType(player) == 'player' ) then if isElement(vehicle[player]) then destroyElement(vehicle[player]) vehicle[player] = nil end vehicle[player] = createVehicle ( 411, -3178.8000488281,-3003.8000488281,5 ) end end ) addEventHandler('onVehicleDamage',resourceRoot,function() if getElementHealth(source) <= 100 then fixVehicle(source) end end ) addEventHandler('onPlayerQuit',root,function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end ) سوها كذا if getElementHealth(source) <= 1000 then بدال كذا if getElementHealth(source) <= 100 then لأن طاقة السيارة اذا صارت اقل من 250 تنفجر
αвυ-wαleed Posted February 12, 2014 Author Posted February 12, 2014 مشكور على الرد لكن ماضبطت نفس أول
فاّرس Posted February 12, 2014 Posted February 12, 2014 تم التعديل , الكوبرا , هو يقول يوم تنفجر , يعني لازم يكون 250 او اقل , انا حطيتها 100 حسبتها تنفجر كذا ذذ
فاّرس Posted February 12, 2014 Posted February 12, 2014 وكأن الكوبرا الي سوى الكود , انا الي غلطان رديت , المهم هذا اذا ماتبي اللاعب يموت وهو داخل السياره اما لو تبيها تنفجر وترجع مره ثانيه استخدم, onVehicleExplode respawnVehicle
αвυ-wαleed Posted February 12, 2014 Author Posted February 12, 2014 وانت كفووو خخخخ لبى قلبك احنا من دونك نضيع والله اسمع ما ابغى تخليه اذا دخل ماركر ينتقل جوا السيارة
فاّرس Posted February 12, 2014 Posted February 12, 2014 لا , موب قصه نضيع وجدتي , بس واحد داخل ومضيع وقته يسوي لك كود , وآخر شيء تشكر واحد غيره -__-" متى تبيه ينتقل ؟
al-Kobra Posted February 12, 2014 Posted February 12, 2014 تم التعديل ,الكوبرا , هو يقول يوم تنفجر , يعني لازم يكون 250 او اقل , انا حطيتها 100 حسبتها تنفجر كذا ذذ لوول ,, انا افكر يقصد من تنقص شوي من طاقتها ض1
αвυ-wαleed Posted February 12, 2014 Author Posted February 12, 2014 اذا دخل الماركر تطلع السيارة في المكان الي حاط احداثياته وهو يكون راكب في السيارة
al-Kobra Posted February 12, 2014 Posted February 12, 2014 مشكور الكوبرااااا مبدع كعادتك العفو ,, بس لازم تشكر ذا بست لأن هو الا سوه الكود
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