d43dr4 Posted December 3, 2012 Share Posted December 3, 2012 (edited) السلام عليكم اخوان كيف الاحوال .. ان شاء الله بخير المهم لدي استفسار و هو حول كيفية انشاء ماركر لما تدخل فيه يعطيك موتر او سيارة هو شفته في بدايات كثيرة حاولت اسويه من الماب اديتور و ما زبط ممكن الطريقة الصحيحة و شكرا لكم مسبقا Edited December 4, 2012 by Guest Link to comment
./BlackBird# Posted December 3, 2012 Share Posted December 3, 2012 createMarker createVehicle Link to comment
d43dr4 Posted December 3, 2012 Author Share Posted December 3, 2012 ممكن الكود كامل او الطريقة لهنت Link to comment
abu5lf Posted December 3, 2012 Share Posted December 3, 2012 (edited) الكود مطروح الف مرة وخمس وعشرين وثلاثة ونص كلمة انشاء تعني خلق او صنع وانت كاتب 'انشاء الله' عدلها الله يصلحك Edited December 3, 2012 by Guest Link to comment
TAPL Posted December 3, 2012 Share Posted December 3, 2012 -- Server Side -- marker = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0) addEventHandler("onMarkerHit", marker, function(player) if getElementType(player) == "player" and not isPedInVehicle(player) then warpPedIntoVehicle(player, createVehicle(id, getElementPosition(player))) end end) Link to comment
d43dr4 Posted December 3, 2012 Author Share Posted December 3, 2012 تم تعديل الكلمة جاري تجريب يا تابل Link to comment
d43dr4 Posted December 3, 2012 Author Share Posted December 3, 2012 شكرا لكم تـــــــــــــــم ... Link to comment
==>ҭᾄlᾄl Posted December 4, 2012 Share Posted December 4, 2012 server: -- By Al3grab tCars = {} tCan = {} function onjoin () tCan[source] = nil end addEventHandler("onPlayerJoin",root,onjoin) marcker1ofGive = createMarker (-3584.5581054688,-3007.271484375,60.200000762939, "cylinder", 4.5, 0, 0, 255, 320 ) function MarkerHit(thePlayer, source) if tCan[thePlayer] ~= true then if not isPedInVehicle(thePlayer) then x,y,z = getElementPosition( thePlayer ) tCars[thePlayer] = createVehicle ( 411, x,y,z ) warpPedIntoVehicle(thePlayer,tCars[thePlayer]) tCan[thePlayer] = true end end end addEventHandler( "onMarkerHit", marcker1ofGive, MarkerHit ) function onquit () if tCars[source] then if isElement(tCars[source]) then destroyElement(tCars[source]) end end tCan[source] = nil end addEventHandler("onPlayerQuit",root,onquit) function destroyIt() setTimer(function(car) for k,v in ipairs ( tCars ) do if v == car then tCars[k] = nil tCan[k] = nil end end destroyElement(car) end , 2000 , 1 ,source,controller) end addEventHandler("onVehicleExplode",root,destroyIt) Link to comment
./BlackBird# Posted December 4, 2012 Share Posted December 4, 2012 server: -- By Al3grab tCars = {} tCan = {} function onjoin () tCan[source] = nil end addEventHandler("onPlayerJoin",root,onjoin) marcker1ofGive = createMarker (-3584.5581054688,-3007.271484375,60.200000762939, "cylinder", 4.5, 0, 0, 255, 320 ) function MarkerHit(thePlayer, source) if tCan[thePlayer] ~= true then if not isPedInVehicle(thePlayer) then x,y,z = getElementPosition( thePlayer ) tCars[thePlayer] = createVehicle ( 411, x,y,z ) warpPedIntoVehicle(thePlayer,tCars[thePlayer]) tCan[thePlayer] = true end end end addEventHandler( "onMarkerHit", marcker1ofGive, MarkerHit ) function onquit () if tCars[source] then if isElement(tCars[source]) then destroyElement(tCars[source]) end end tCan[source] = nil end addEventHandler("onPlayerQuit",root,onquit) function destroyIt() setTimer(function(car) for k,v in ipairs ( tCars ) do if v == car then tCars[k] = nil tCan[k] = nil end end destroyElement(car) end , 2000 , 1 ,source,controller) end addEventHandler("onVehicleExplode",root,destroyIt) شخاابيط Marker = createMarker(...) addEventHandler('onMarkerHit',Marker, function(hit) if(getElementType(hit)=='player')then if(isElement(car))then destroyElement(car) end return end car =createVehicle( .. ) warpPedIntoVehicle(hit,car) end end addEventHandler('onPlayerQuit',root,function() if isElement(car) then destroyElement(car) end) addEventHandler('onVehicleExplode',car,function() destroyElement(source) 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