Jump to content

طلب كود


BeCooL

Recommended Posts

Posted
warpPedIntoVehicle 

انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة

وآسف على الاطاله :)

Posted

انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة

وآسف على الاطاله :)

warpPedIntoVehicle 

Posted

انا غلطان في موضوع انا مسوي ماركر ابغى اذا وقفت على الماركر تطلع سيارة وسويته بس تطلع السيارة على الاعب انا ابغاه يكون راكب السيارة

وآسف على الاطاله :)

warpPedIntoVehicle 

طيب اخوي اللي بين الاقواس وش اكتب فيهم مافهمت !!

  warpPedIntoVehicle ( RacerPed, RaceVehicle ) 

Posted
warpPedIntoVehicle ( player, vehicle ) 
--player = الاعب 
--vehicle = السيارة 

مكان السيارة اكتب الآي دي ولا اسم السيارة ؟

Posted
مثلا
car = createVehicle(...) 
  

تحط اسم السيارة و هو

car

مشكوور ي مجنون فيك بس فيه مشكله اذا طلعت السيارة تطلع معها اكثر من سيارة ابغى تطلع سيارة وحده بس

Posted
حط كودك كامل
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 ) 

Posted (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 by Guest
Posted
    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 ) 

نفس المشكله تطلع اكثر من سيارة

Posted

اذا كنت تبي الاعب ياخذ مرا وحده

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 ) 

Posted
اذا كنت تبي الاعب ياخذ مرا وحده
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 ) 

الاعب ياخذ مره وحده بس حتى اذا الاعب طلع من الماركر يبقى الماركر يطلع سيارات فهمت علي ؟

Posted

جرب هذا

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 ) 

Posted

والله تعقدت من كثر الكودات

انا توني جديد وابغى اتعلم شوي شوي

شوف

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 ) 

هذا كودي واهو يعطيني سيارة بس يكرر السيارة حتى اذا الاعب طلع من الماركر انت عطني الامر بس اوك

طيب عطني كود اذا الواحد طلع سيارة تختفي اللي قبلها يمكن تنحل المشكله :D

واسف والله طولت عليكم

Posted

مشكوور لكل الشباب اللي ساعدوني :D

الحين انا سويت المود بس ابغى اسوي اكثر من ماركر

هذا الكود

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 
) 

بس انا سألت من قبل ورد علي تابل وعدلها لي وضبط بس مافهمت شنو عدل في الكود وانا ابغى اتعلم يعني ياليت واحد يعدلها ويعلمني كيف

Posted

عندكـ طريقتين . .

أما بـ تكرار الكود

  
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 
  

Posted
عندكـ طريقتين . .

أما بـ تكرار الكود

  
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 
) 

بس صار الماركر الاول والثاني ما تطلع سيارة ؟؟؟

Posted
  
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 
) 
  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...