BeCooL Posted October 26, 2012 Share Posted October 26, 2012 السلام عليكم يشباب ابغى كود اذا الاعب طلع سيارة يكون راكب فيها Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 warpPedIntoVehicle انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة وآسف على الاطاله Link to comment
abu5lf Posted October 26, 2012 Share Posted October 26, 2012 انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة وآسف على الاطاله warpPedIntoVehicle Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة وآسف على الاطاله warpPedIntoVehicle طيب اخوي اللي بين الاقواس وش اكتب فيهم مافهمت !! warpPedIntoVehicle ( RacerPed, RaceVehicle ) Link to comment
abu5lf Posted October 26, 2012 Share Posted October 26, 2012 warpPedIntoVehicle ( player, vehicle ) --player = الاعب --vehicle = السيارة Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 warpPedIntoVehicle ( player, vehicle ) --player = الاعب --vehicle = السيارة مكان السيارة اكتب الآي دي ولا اسم السيارة ؟ Link to comment
./BlackBird# Posted October 26, 2012 Share Posted October 26, 2012 مثلا car = createVehicle(...) تحط اسم السيارة و هو car Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 مثلا car = createVehicle(...) تحط اسم السيارة و هو car مشكوور ي مجنون فيك بس فيه مشكله اذا طلعت السيارة تطلع معها اكثر من سيارة ابغى تطلع سيارة وحده بس Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 حط كودك كامل myMarker = createMarker(0, 0, 2, 'cylinder', 2.0, 50, 50, 50, 150) function MarkerHit( hitPlayer, matchingDimension ) bmx = createVehicle ( 481, 0, 0, 3 + 10 ) warpPedIntoVehicle ( hitPlayer, bmx ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) Link to comment
./BlackBird# Posted October 26, 2012 Share Posted October 26, 2012 (edited) myMarker = createMarker(0, 0, 2, 'cylinder', 2.0, 50, 50, 50, 170) function MarkerHit( hitPlayer) bmx = createVehicle ( 481, 0, 0, 3 ) warpPedIntoVehicle ( hitPlayer, bmx ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) Edited October 26, 2012 by Guest Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 myMarker = createMarker(0, 0, 2, 'cylinder', 2.0, 50, 50, 50, 150) function MarkerHit( hitPlayer) bmx = createVehicle ( 481, 0, 0, 3 + 10 ) warpPedIntoVehicle ( hitPlayer, bmx ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) نفس المشكله تطلع اكثر من سيارة Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 عدلت ردي روح جربه نفس المشكله عدل الكود وحطه لي كامل لاتعدل ردك لاهنت Link to comment
GAME_OVER!! Posted October 26, 2012 Share Posted October 26, 2012 اذا كنت تبي الاعب ياخذ مرا وحده function s() setElementData(source,"xxxx",tostring("Yes")) end addEventHandler("onPlayerJoin",root,s) ma = createMarker (x,y,z, "cylinder", 1, 255, 0,0, 255 ) function Marker( thePlayer ) q = getElementData(thePlayer,"xxxx") if q == "Yes" then if not isPedInVehicle(thePlayer) then x,y,z = getElementPosition( thePlayer ) i = createVehicle ( 221, x, y, z ) warpPedIntoVehicle(thePlayer,i) setElementData(thePlayer,"xxxx",tostring("No")) end end end addEventHandler( "onMarkerHit", ma, Marker ) واذا كنت تبي مايكرر جرب هذا ma = createMarker (x,y,z, "cylinder", 1, 255, 0,0, 255 ) xxx = {} function Marker(thePlayer) if xxx[thePlayer] then if isElement(Vehz[thePlayer]) then destroyElement(Vehz[thePlayer]) end end local x, y, z = getElementPosition(thePlayer) xxx[thePlayer] = createVehicle(411,x,y,z) warpPedIntoVehicle(thePlayer, xxx[thePlayer]) end addEventHandler( "onMarkerHit", ma, Marker ) Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 اذا كنت تبي الاعب ياخذ مرا وحده function s() setElementData(source,"xxxx",tostring("Yes")) end addEventHandler("onPlayerJoin",root,s) ma = createMarker (x,y,z, "cylinder", 1, 255, 0,0, 255 ) function Marker( thePlayer ) q = getElementData(thePlayer,"xxxx") if q == "Yes" then if not isPedInVehicle(thePlayer) then x,y,z = getElementPosition( thePlayer ) i = createVehicle ( 221, x, y, z ) warpPedIntoVehicle(thePlayer,i) setElementData(thePlayer,"xxxx",tostring("No")) end end end addEventHandler( "onMarkerHit", ma, Marker ) واذا كنت تبي مايكرر جرب هذا ma = createMarker (x,y,z, "cylinder", 1, 255, 0,0, 255 ) xxx = {} function Marker(thePlayer) if xxx[thePlayer] then if isElement(Vehz[thePlayer]) then destroyElement(Vehz[thePlayer]) end end local x, y, z = getElementPosition(thePlayer) xxx[thePlayer] = createVehicle(411,x,y,z) warpPedIntoVehicle(thePlayer, xxx[thePlayer]) end addEventHandler( "onMarkerHit", ma, Marker ) الاعب ياخذ مره وحده بس حتى اذا الاعب طلع من الماركر يبقى الماركر يطلع سيارات فهمت علي ؟ Link to comment
GAME_OVER!! Posted October 26, 2012 Share Posted October 26, 2012 جرب هذا ma = createMarker (x,y,z, "cylinder", 1, 255, 0,0, 255 ) xxx = {} function Marker(thePlayer) if xxx[thePlayer] then if isElement(xxx[thePlayer]) then destroyElement(xxx[thePlayer]) end end local x, y, z = getElementPosition(thePlayer) xxx[thePlayer] = createVehicle(411,x,y,z) warpPedIntoVehicle(thePlayer, xxx[thePlayer]) end addEventHandler( "onMarkerHit", ma, Marker ) Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 والله تعقدت من كثر الكودات انا توني جديد وابغى اتعلم شوي شوي شوف myMarker = createMarker(0, 0, 2, 'cylinder', 2.0, 50, 50, 50, 150) function MarkerHit( hitPlayer) bmx = createVehicle ( 481, 0, 0, 3 + 10 ) warpPedIntoVehicle ( hitPlayer, bmx ) end addEventHandler( "onMarkerHit", myMarker, MarkerHit ) هذا كودي واهو يعطيني سيارة بس يكرر السيارة حتى اذا الاعب طلع من الماركر انت عطني الامر بس اوك طيب عطني كود اذا الواحد طلع سيارة تختفي اللي قبلها يمكن تنحل المشكله واسف والله طولت عليكم Link to comment
abu5lf Posted October 26, 2012 Share Posted October 26, 2012 الكود قد سويته لو تبحث عنه في المواضيع القديمة تلقاه Link to comment
BeCooL Posted October 26, 2012 Author Share Posted October 26, 2012 مشكوور لكل الشباب اللي ساعدوني الحين انا سويت المود بس ابغى اسوي اكثر من ماركر هذا الكود myMarker = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) addEventHandler ( "onMarkerHit", myMarker, function ( hitPlayer ) if ( isPedInVehicle ( hitPlayer ) == false ) then theData = getElementData ( hitPlayer , "theCar" ) if ( theData ) then destroyElement ( theData ) end x, y, z = getElementPosition ( hitPlayer ) myMarker = createVehicle ( 481, x, y, z ) warpPedIntoVehicle ( hitPlayer, myMarker ) setElementData ( hitPlayer, "theCar", root ) end end ) بس انا سألت من قبل ورد علي تابل وعدلها لي وضبط بس مافهمت شنو عدل في الكود وانا ابغى اتعلم يعني ياليت واحد يعدلها ويعلمني كيف Link to comment
3NAD Posted October 27, 2012 Share Posted October 27, 2012 عندكـ طريقتين . . أما بـ تكرار الكود myMarker1 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker2 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker3 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) او الجداول myMarkers = { { x, y, z }, { x, y, z }, { x, y, z }, } for _, Marker in ipairs ( myMarkers ) do createMarker ( Marker[1], Marker[2], Marker[3] ) end Link to comment
BeCooL Posted October 27, 2012 Author Share Posted October 27, 2012 عندكـ طريقتين . . أما بـ تكرار الكود myMarker1 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker2 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker3 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) او الجداول myMarkers = { { x, y, z }, { x, y, z }, { x, y, z }, } for _, Marker in ipairs ( myMarkers ) do createMarker ( Marker[1], Marker[2], Marker[3] ) end جربتها وطلع الكود كذا myMarker1 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker2 = createMarker( 1184.0268554688, -1332.1184082031, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) addEventHandler ( "onMarkerHit", myMarker, function ( hitPlayer ) if ( isPedInVehicle ( hitPlayer ) == false ) then theData = getElementData ( hitPlayer , "theCar" ) if ( theData ) then destroyElement ( theData ) end x, y, z = getElementPosition ( hitPlayer ) myMarker = createVehicle ( 481, x, y, z ) warpPedIntoVehicle ( hitPlayer, myMarker ) setElementData ( hitPlayer, "theCar", myMarker ) end end ) بس صار الماركر الاول والثاني ما تطلع سيارة ؟؟؟ Link to comment
3NAD Posted October 27, 2012 Share Posted October 27, 2012 myMarker1 = createMarker( 1184.3974609375, -1315.8817138672, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) myMarker2 = createMarker( 1174.0268554688, -1332.1184082031, 12.572691917419, "cylinder", 2, 150, 150, 150, 160 ) addEventHandler ( "onMarkerHit", myMarker1, function ( hitPlayer ) if ( isPedInVehicle ( hitPlayer ) ~= true ) then theData = getElementData ( hitPlayer , "theCar" ) if ( theData ) then destroyElement ( theData ) end x, y, z = getElementPosition ( hitPlayer ) myCar = createVehicle ( 481, x, y, z ) warpPedIntoVehicle ( hitPlayer, myCar ) setElementData ( hitPlayer, "theCar", myCar ) end end ) addEventHandler ( "onMarkerHit", myMarker2, function ( hitPlayer ) if ( isPedInVehicle ( hitPlayer ) ~= true ) then theData = getElementData ( hitPlayer , "theCar" ) if ( theData ) then destroyElement ( theData ) end x, y, z = getElementPosition ( hitPlayer ) myCar = createVehicle ( 481, x, y, z ) warpPedIntoVehicle ( hitPlayer, myCar ) setElementData ( hitPlayer, "theCar", myCar ) end 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