FRoTE-502 Posted June 15, 2014 Share Posted June 15, 2014 السلام عليكم ورحمة الله وبركآته انا ابي مساعدهه منكم انا معي مود ماركر السيارات ابيه اذا اخذ موتر بينقلهه ل مكان معين انا حاولت اسويهه بس ماضبط function MarkerHit( thePlayer ) permission = getElementData(thePlayer,"CanUseTheMarkeryesorNo") if permission == "Yes" then if source == marcker1ofGive and getElementType(thePlayer) == "player" then oCar = getPedOccupiedVehicle(thePlayer) if oCar then destroyElement(infurnuis[thePlayer]) x,y,z = getElementPosition( thePlayer ) infurnuis[thePlayer] = createVehicle ( 411,x,y+8,z+3 ) warpPedIntoVehicle(thePlayer,infurnuis[thePlayer]) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1010) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1087) setElementPosition(localPlayer, -2560.4143066406, -4770.177734375, 5 outputChatBox ( "[ تم أعطائك سيآرة مع : نيترو + هيدروليك ]", thePlayer, 255, 0, 0, true ) outputChatBox ( "[ Ctrl لـ تشغيل/ايقاف النيترو اضغط ]", thePlayer, 255, 255, 0, true ) outputChatBox ( "[ Caps Lock لـ تشغيل/ايقاف الهيدروليك اضغط ]", thePlayer, 255, 0, 0, true ) Link to comment
</Mr.Tn6eL> Posted June 15, 2014 Share Posted June 15, 2014 شيل سطر x,y,z = getElementPosition( thePlayer ) وهذا السطر شيله setElementPosition(localPlayer, -2560.4143066406, -4770.177734375, 5 وبدل هذا السطر infurnuis[thePlayer] = createVehicle ( 411,x,y+8,z+3 ) بهذا infurnuis[thePlayer] = createVehicle ( 411,x,y,z ) حط بدال x, y, z الاحداثيات حقت المكان اللي تبيه واكوادك ناقصة جدول و كم end واالافنت Link to comment
3NAD Posted June 16, 2014 Share Posted June 16, 2014 carsMarker = { }; function MarkerHit( thePlayer ) if getElementType(thePlayer) == "player" then local permission = getElementData(thePlayer,"CanUseTheMarkeryesorNo") if permission then if permission == "Yes" then if source == marcker1ofGive then if carsMarker[thePlayer] then if isElement ( carsMarker[thePlayer] ) then destroyElement(carsMarker[thePlayer]) end end carsMarker[thePlayer] = createVehicle ( 411,-2560.4143066406, -4770.177734375, 5 ) setTimer ( warpPedIntoVehicle, 100, 1, thePlayer, carsMarker[thePlayer] ) addVehicleUpgrade ( carsMarker[thePlayer], 1010) addVehicleUpgrade(carsMarker[thePlayer], 1087) outputChatBox ( "[ تم أعطائك سيآرة مع : نيترو + هيدروليك ]", thePlayer, 255, 0, 0, true ) outputChatBox ( "[ Ctrl لـ تشغيل/ايقاف النيترو اضغط ]", thePlayer, 255, 255, 0, true ) outputChatBox ( "[ Caps Lock لـ تشغيل/ايقاف الهيدروليك اضغط ]", thePlayer, 255, 0, 0, true ) end end end end end addEventHandler ( "onPlayerQuit", root, function ( ) if carsMarker[source] then if isElement ( carsMarker[source] ) then destroyElement(carsMarker[source]) end carsMarker[source] = nil end end ) Link to comment
FRoTE-502 Posted June 16, 2014 Author Share Posted June 16, 2014 شباب اشكركم على الرد بس المود موب راضي يضبط هذا المود كآمل , سيرفر infurnuis = {} resourceRoot = getResourceRootElement(getThisResource()) function onjoin () setElementData(source,"CanUseTheMarkeryesorNo",tostring("Yes")) end addEventHandler("onPlayerJoin",root,onjoin) addEventHandler ( "onResourceStart", resourceRoot, onjoin ) marcker1ofGive = createMarker (-2537.130859375, -5070.3500976563, 76.404937744141, "cylinder", 4.5, 0, 0, 255, 320 ) thing1 = createObject( 11326, -3259.2490234375, -3019.8994140625, 6.5, 0, 0, 0 ) function MarkerHit( thePlayer ) if getElementType(thePlayer) == "player" then local permission = getElementData(thePlayer,"CanUseTheMarkeryesorNo") if permission then if permission == "Yes" then if source == marcker1ofGive then if marcker1ofGive[thePlayer] then if isElement ( marcker1ofGive[thePlayer] ) then destroyElement(marcker1ofGive[thePlayer]) end end marcker1ofGive[thePlayer] = createVehicle ( 411,-2560.4143066406, -4770.177734375, 5 ) setTimer ( warpPedIntoVehicle, 100, 1, thePlayer, marcker1ofGive[thePlayer] ) addVehicleUpgrade ( marcker1ofGive[thePlayer], 1010) addVehicleUpgrade(marcker1ofGive[thePlayer], 1087) outputChatBox ( "[ تم أعطائك سيآرة مع : نيترو + هيدروليك ]", thePlayer, 255, 0, 0, true ) outputChatBox ( "[ Ctrl لـ تشغيل/ايقاف النيترو اضغط ]", thePlayer, 255, 255, 0, true ) outputChatBox ( "[ Caps Lock لـ تشغيل/ايقاف الهيدروليك اضغط ]", thePlayer, 255, 0, 0, true ) end end end end end addEventHandler ( "onPlayerQuit", root, function ( ) if carsMarker[source] then if isElement ( carsMarker[source] ) then destroyElement(carsMarker[source]) end carsMarker[source] = nil end end ) addEventHandler("onVehicleExplode",root,function() setTimer(fixVehicle,2000,1,source) end) Link to comment
</Mr.Tn6eL> Posted June 17, 2014 Share Posted June 17, 2014 وين افنت دخول الماركر + addEventHandler("onVehicleExplode",root,function() setTimer(fixVehicle,2000,1,source) end) بتنفجر وبعد ثانيتين تتصلح لو جاء المارد السحري ماراح ترجع Link to comment
FRoTE-502 Posted June 17, 2014 Author Share Posted June 17, 2014 وين افنت دخول الماركر+ addEventHandler("onVehicleExplode",root,function() setTimer(fixVehicle,2000,1,source) end) بتنفجر وبعد ثانيتين تتصلح لو جاء المارد السحري ماراح ترجع مافهمتكـ + وش الخطأ في المود Link to comment
</Mr.Tn6eL> Posted June 17, 2014 Share Posted June 17, 2014 marcker1ofGive = createMarker (-2537.130859375, -5070.3500976563, 76.404937744141, "cylinder", 4.5, 0, 0, 255, 320 ) marcker1ofGive[thePlayer] = createVehicle ( 411,-2560.4143066406, -4770.177734375, 5 ) ليه حاطهم نفس الاسم Link to comment
FRoTE-502 Posted June 17, 2014 Author Share Posted June 17, 2014 ااخ تنطيل حاولت في المود 10 مرات مو راضي يضبط infurnuis = {} resourceRoot = getResourceRootElement(getThisResource()) function onjoin () setElementData(source,"CanUseTheMarkeryesorNo",tostring("Yes")) end addEventHandler("onPlayerJoin",root,onjoin) addEventHandler ( "onResourceStart", resourceRoot, onjoin ) marcker1ofGive = createMarker (-3244.7646484375, -3018.603515625, 5.5254940986633, "cylinder", 4.5, 0, 0, 255, 320 ) function MarkerHit( thePlayer ) permission = getElementData(thePlayer,"CanUseTheMarkeryesorNo") if permission == "Yes" then if source == marcker1ofGive and getElementType(thePlayer) == "player" then oCar = getPedOccupiedVehicle(thePlayer) if oCar then destroyElement(infurnuis[thePlayer]) x,y,z = getElementPosition( thePlayer ) infurnuis[thePlayer] = createVehicle ( 411,-2560.4143066406,-4770.177734375,5 ) warpPedIntoVehicle(thePlayer,infurnuis[thePlayer]) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1010) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1087) outputChatBox ( "[ تم أعطائك سيآرة مع : نيترو + هيدروليك ]", thePlayer, 255, 0, 0, true ) outputChatBox ( "[ Ctrl لـ تشغيل/ايقاف النيترو اضغط ]", thePlayer, 255, 255, 0, true ) outputChatBox ( "[ Caps Lock لـ تشغيل/ايقاف الهيدروليك اضغط ]", thePlayer, 255, 0, 0, true ) else if infurnuis[thePlayer] and getElementType(infurnuis[thePlayer]) == "vehicle" then destroyElement(infurnuis[thePlayer]) end x,y,z = getElementPosition( thePlayer ) infurnuis[thePlayer] = createVehicle ( 411,-2560.4143066406,-4770.177734375,5 ) warpPedIntoVehicle(thePlayer,infurnuis[thePlayer]) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1010) addVehicleUpgrade(getPedOccupiedVehicle(thePlayer), 1087) outputChatBox ( "[ تم أعطائك سيآرة مع : نيترو + هيدروليك ]", thePlayer, 255, 0, 0, true ) outputChatBox ( "[ Ctrl لـ تشغيل/ايقاف النيترو اضغط ]", thePlayer, 255, 255, 0, true ) outputChatBox ( "[ Caps Lock لـ تشغيل/ايقاف الهيدروليك اضغط ]", thePlayer, 255, 0, 0, true ) end end end end addEventHandler( "onMarkerHit", marcker1ofGive, MarkerHit ) addEventHandler("onPlayerQuit",root,function() destroyElement(infurnuis[source]) infurnuis[source] = nil end) addEventHandler("onVehicleExplode",root,function() setTimer(fixVehicle,2000,1,source) end) Link to comment
TAPL Posted June 17, 2014 Share Posted June 17, 2014 كودك فيه هريس الي ما فهمته وش فايده الألمنت داتا ذا الي تحطه اول ما يدخل اللاعب و ما اشوف غيرت الالمنت داتا في اي مكان ثاني السورس فيه مو لاعب onResourceStart اضافة إلى ان الأفنت 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