S4MuEL Posted May 1, 2013 Author Posted May 1, 2013 يعطيكـ العآففيةة .. الححين آسوي مآركر ثآني وعليه بلآيب ويومم يروح الاعب المآركر الثآني يققدر ينزل من الموتر تققدر تسويلي الكود ؟
S4MuEL Posted May 1, 2013 Author Posted May 1, 2013 آوتسسيه ، الحين سسهل ، ذذ @S3d كودكـ ششغآل وتممآمم بس المشكلةة يومم آطلع من السيرففر البلآيب تظظل بس يتغيير ممكآنهآ وش الحل destroyElement ?
MR.S3D Posted May 1, 2013 Posted May 1, 2013 Vehicle = {} addEvent("nothing", true) addEventHandler("nothing",getRootElement(),function () if not Vehicle[source] then Vehicle[source] = {} end if isElement ( Vehicle[source]['myBilp'] ) then destroyElement(Vehicle[source]['myBilp']) elseif isElement ( Vehicle[source]['myVehicle'] ) then destroyElement(Vehicle[source]['myVehicle']) end Vehicle[source]['myVehicle'] = createVehicle ( 473,-1457.09363,1022.52289,0.67758,0.89540588855743,2.3755996153341e-005,269.57095336914 ) warpPedIntoVehicle(source,Vehicle[source]['myVehicle']) Vehicle[source]['myBilp'] = createBlipAttachedTo(Vehicle[source]['myVehicle'],9) setElementModel(source,45) end ) addEventHandler("onVehicleStartExit",getRootElement(), function (plr) if ( Vehicle[plr] and Vehicle[plr]['myVehicle'] and isElement ( Vehicle[plr]['myVehicle'] ) ) then cancelEvent( true ) end end ) addEventHandler("onPlayerQuit",root, function ( ) if ( Vehicle[source] ) then if isElement ( Vehicle[source]['myBilp'] ) then destroyElement(Vehicle[source]['myBilp']) elseif isElement ( Vehicle[source]['myVehicle'] ) then destroyElement(Vehicle[source]['myVehicle']) end Vehicle[source] = nil end end )
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 ي ششبآب آبغى لمآ الاعب يآخذ السسيآرةة يققدر يتجول بهآ ع طول بس بـ وققت محدد ممثلآ الاعب يتجول بسيارته بعد مثلآ 10 دقآيقق يجيه مآركر وإذآ الاعب مآ لمس المآركر بال دقيقتين تتفجر سيآرته ممكن آحد يسوي لي الكود ؟ ذذ ولآ آحآول ؟ :\
iPrestege Posted May 2, 2013 Posted May 2, 2013 setTimer createMarker "onMarkerHit" setElementData if not getElementData then blowVehicle
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 التآيمر وهآذي setElementData if not getElementData then مآ آعرفف لهآ -_-"
iPrestege Posted May 2, 2013 Posted May 2, 2013 https://forum.multitheftauto.com/viewtopic.php?f=160&t=58438setTimer
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 عآففس آمم الكود ، إدري ذذ + الداتا مآ عرفت لهآ السيرففر - local Marker2 = createMarker (.....) addEventHandler("onMarkerhit", Marker2, function() destroyElement(car) else blowVehicle(car) setTimer(function() blowVehicle(car) end,20000,1) end ) ------ الكلنت : setTimer(function() triggerServerEvent("nothing",getLocalPlayer()) end,100000,1) end end) مآ سويت كآمل الكود شفف لي ذآ وذآ
iPrestege Posted May 2, 2013 Posted May 2, 2013 شف ذا واعرف كيف : addCommandHandler("create", function ( player ) local x,y,z = getElementPosition ( player ) if isElement ( vehicle ) then destroyElement ( vehicle ) end vehicle = createVehicle ( 411 , x,y,z ) if not vehicle then return end warpPedIntoVehicle( player,vehicle ) marker = createMarker( x + 4, y + 2, z -1, "cylinder", 2, 255, 0, 0, 255 ) setElementData( vehicle,"Created",true ) setTimer( function ( ) if not getElementData( vehicle,"Created" ) == false then blowVehicle ( vehicle ) end end,15000,1 ) end ) addEventHandler("onMarkerHit",getRootElement(), function ( player ) if getElementType(player) == "player" then if source ~= marker then return end if not isPedInVehicle(player) then return end if vehicle and isElement(vehicle) then if getElementData(vehicle,"Created",false) then return end setElementData(vehicle,"Created",false) outputChatBox("True",player) end end end )
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 المآركر آبيه آول ممخفي بآي ففنكشن آخخفيه ؟ + بعد 10 دقآيقق يطلع !
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 (edited) setElementVisibleTo( Marker2,false) setTimer( function() setElementVisibleTo ( Marker2,true) 10000,1) end) ? Edited May 2, 2013 by Guest
iMr.Dawix~# Posted May 2, 2013 Posted May 2, 2013 setElementVisibleTo ( Marker2,elementTo,true) elementTo = الي تصير له الوظيفه يعني يشوف او مايشوف الماركر
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 آبيه يخفي للللآعب يلي آخذ السيآرةة بس ! واللآعبين بعد = getRootElement ?
iMr.Dawix~# Posted May 2, 2013 Posted May 2, 2013 آبيه يخفي للللآعب يلي آخذ السيآرةة بس !واللآعبين بعد = getRootElement ? setElementVisibleTo ( Marker2,root,true) root = getRootElement() << للفائدة فقط
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 إدري ذذ -- الكود يلي سويته فوقق يصير كذآ ؟ setElementVisibleTo( Marker2,root,false) setTimer( function() setElementVisibleTo ( Marker2,player,true) 10000,1) end) البلآير آنآ بعرفهة .. صحيح الكود يصير ؟ !
S4MuEL Posted May 2, 2013 Author Posted May 2, 2013 setElementVisibleTo( Marker2,root,false) setTimer( function( player ) if ( getElementType(player) == ("player") ) then setElementVisibleTo ( Marker2,player,true) 10000,1) end end)
iPrestege Posted May 2, 2013 Posted May 2, 2013 setElementVisibleTo( Marker2,root,false) setTimer( function( player ) if ( getElementType(player) == ("player") ) then setElementVisibleTo ( Marker2,player,true) 10000,1) end end) كذا يطلع لاي لاعب وش سوى الاعب؟ سوي كوماند ولا شيء !
Recommended Posts