S4MuEL Posted April 24, 2013 Posted April 24, 2013 السلآمم عليكمم وأنا جآلسس آججرب ككودآت ، ممشى ممعي الكود الأول يلي يعططي السسيآرةة للللآعب لممآ يسسجل ددخخولهه .. بسس الكود الثآني مم مششى !! آبغغآهه ، إذآ سسجل خخروجهه تنسسحب السيآرةة ! addEventHandler("onPlayerLogin",root, function ( ) local x,y,z = getElementPosition ( source ) local vehicle = createVehicle ( 411,x,y,z ) if not ( vehicle ) then return end local warp = warpPedIntoVehicle( source,vehicle) end ) addEventHandler("onPlayerLogout",root, function ( ) if (getElementModel(source) == 411) then local car = getPedOccupiedVehicle(source) if car then destroyElement ( car ) end end end )
فاّرس Posted April 24, 2013 Posted April 24, 2013 addEventHandler("onPlayerLogin",root, function ( ) local x,y,z = getElementPosition ( source ) local vehicle = createVehicle ( 411,x,y,z ) if not ( vehicle ) then return end local warp = warpPedIntoVehicle( source,vehicle) end ) addEventHandler("onPlayerLogout",root, function () local car = getPedOccupiedVehicle(source) if car then destroyElement ( car ) end end )
3NAD Posted April 24, 2013 Posted April 24, 2013 السلآمم عليكمموأنا جآلسس آججرب ككودآت ، ممشى ممعي الكود الأول يلي يعططي السسيآرةة للللآعب لممآ يسسجل ددخخولهه .. بسس الكود الثآني مم مششى !! آبغغآهه ، إذآ سسجل خخروجهه تنسسحب السيآرةة ! addEventHandler("onPlayerLogin",root, function ( ) local x,y,z = getElementPosition ( source ) local vehicle = createVehicle ( 411,x,y,z ) if not ( vehicle ) then return end local warp = warpPedIntoVehicle( source,vehicle) end ) addEventHandler("onPlayerLogout",root, function ( ) if (getElementModel(source) == 411) then local car = getPedOccupiedVehicle(source) if car then destroyElement ( car ) end end end ) ليه ماتسويه جدول ؟ و تستخدم معرف السيارة عند تسجيل الخروج
S4MuEL Posted April 24, 2013 Author Posted April 24, 2013 @3NAD ممآ آعرفف للجدآول ! ولآ آبي آععرفف لهآ ، الججدآول ممآ تجي بـ مسستوآي هذآ ! -_-"
MSHOOSH Posted April 24, 2013 Posted April 24, 2013 Vehicles = {} addEventHandler( "onPlayerLogout", root, function( ) if Vehicles[source] then destroyElement( Vehicles[source] ) end end ) بالتوفيق ^
|Mr|-Talal07-| Posted April 24, 2013 Posted April 24, 2013 اذا انت مهتم للهجوله و بتستخدم السيارات كثير انصحك تتعلم الجداول و هي مره سهله و تنفعك في اشياء كثيره و ترفع من خبرتك اما بالنسبه لكودك شوف ذاا veh = {} addEventHandler("onPlayerLogin",root, function ( ) local x,y,z = getElementPosition ( source ) veh[source] = createVehicle(411,x,y,z) warpPedIntoVehicle(source,veh[source]) end ) addEventHandler("onPlayerLogout",root, function ( ) if isElement(veh[source]) then destroyElement(veh[source]) veh[source] = nil end end ) addEventHandler("onPlayerQuit",root, function ( ) if isElement(veh[source]) then destroyElement(veh[source]) veh[source] = nil end end ) بعدين مافي شخصيه رقم 411 و ما اظن في سياره بتسجل خروجها
S4MuEL Posted April 24, 2013 Author Posted April 24, 2013 411 = infernus = سسيآرةة ! = \ وآققرأ زين الممحتوى !! ققلت لممآ الاعب يسسجل خخروجهه تنسسحب السسيآرةة !
iPrestege Posted April 24, 2013 Posted April 24, 2013 طيب؟ صح عليه كودك يوم يسجل خروج ويطلع عشان تنسحب عشان الاق ..
iPrestege Posted April 24, 2013 Posted April 24, 2013 if (getElementModel(source) == 411) then هنآ تجيب شخصية الاعب ؟ وسوية جدول آحسن / =
S4MuEL Posted April 24, 2013 Author Posted April 24, 2013 آههآ أوتسسيه # تمممت اللإففآدةة + ممششكورين ججميعآ
S4MuEL Posted May 18, 2013 Author Posted May 18, 2013 if (getElementModel(source) == 411) then هنآ تجيب شخصية الاعب ؟ وسوية جدول آحسن / = تققولي ششخصيةة اللآعب ؟ ههنآ للسيآرآت وإششتغل معي ؟ :\ local teamPolice = "Police" local text = "You Canot Drive Police Cars" local idTable = {490,528,523,598,596,597,599,601} addEventHandler("onVehicleEnter", root, function( thePlayer,seat ) for i,v in ipairs ( idTable ) do if ( getElementModel( source ) == v ) then if ( getTeamName( getPlayerTeam( thePlayer ) ) ~= teamPolice ) and ( seat == 0 ) then removePedFromVehicle ( thePlayer ) outputChatBox(text, thePlayer, 255, 0, 0, false) end end end end)
кιηg-αвα∂у Posted May 18, 2013 Posted May 18, 2013 في هذه الحدث المصدر هو السيارة اقرأ الويكي حتى لو بترجمة قوقل وبتفهم https://wiki.multitheftauto.com/wiki/OnVehicleEnter The source of this event is the vehicle that was entered. بس في حدث تسجيل الخروج https://wiki.multitheftauto.com/wiki/OnPlayerLogout The source of this event is the player that logged out. يعني المصدر في هذه الحدث الاعب الي سجل خروج
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