Jump to content

اخذ سيارة عند لمس الماركر


Recommended Posts

vehicle = {} 
local marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
  
addEventHandler("onMarkerHit",marker, 
    function ( player ) 
        if ( getElementType ( player ) == ( "player" ) ) then 
        if ( vehicle[player] and isElement ( vehicle[player] ) ) then 
        destroyElement ( vehicle[player] ) 
       end 
        vehicle[player] = createVehicle ( id , x , y , z ) 
    end 
end 
) 
  

لم يتم التجربة سيرفر ! بدل :

id = موديل السيارهـ !

x,y,z = احداثيات الانشاء !

Link to comment

ما يحتاج تشقلب له , سو له الكود حقه وخلآص,

Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
addEventHandler("onMarkerHit",Marker, 
function(player) 
if (getElementType(player) ==  'player' ) then 
  createVehicle ( ID, x, y, z  ) 
    end 
end) 

Edited by Guest
Link to comment
  • 9 months later...
ما يحتاج تشقلب له , سو له الكود حقه وخلآص,
Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
addEventHandler("onMarkerHit",Marker, 
function(player) 
if (getElementType(player) ==  'player' ) then 
  createVehicle ( ID, x, y, z  ) 
    end 
end) 

هذا شسمه يحط موتر بس

لكن اللاعب ما يدخل الموتر $

Link to comment
ما يحتاج تشقلب له , سو له الكود حقه وخلآص,
Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
addEventHandler("onMarkerHit",Marker, 
function(player) 
if (getElementType(player) ==  'player' ) then 
  createVehicle ( ID, x, y, z  ) 
    end 
end) 

هذا شسمه يحط موتر بس

لكن اللاعب ما يدخل الموتر $

Postby The Best on Wed May 01, 2013 2:25 pm ,, -_-

Link to comment
Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
addEventHandler("onMarkerHit",Marker, 
function() 
if( isElement ( enksar ) ) then  
         local x, y, z = getElementPosition ( source ) 
         local enksar = createVehicle( 411, x, y, z) 
         warpPedIntoVehicle ( source, enksar ) 
    end 
end) 

مآجربته

Link to comment
Marker = createMarker (246.7275390625,62.3232421875,1003.640625, "cylinder", 2,0, 0, 255,255) 
addEventHandler("onMarkerHit",Marker, 
function() 
if( isElement ( enksar ) ) then  
         local x, y, z = getElementPosition ( source ) 
         local enksar = createVehicle( 411, x, y, z) 
         warpPedIntoVehicle ( source, enksar ) 
    end 
end) 

مآجربته

X

Link to comment
  
Vehicles = {} 
VehicleM = createMarker ( 2681.791015625,-2325.9450683594, 3.0178125, "cylinder", 2, 0, 0, 0, 0 ) 
  
addEventHandler( "onMarkerHit", root, 
    function ( hitElement ) 
        if source == VehicleM and getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( 474, 730.21240234375, -2570.2185058594, 3.0261313915253 ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
            end 
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then 
            local player = getPedOccupiedVehicle( hitElement ) 
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) ) 
            outputChatBox( "", hitElement, 0, 255, 0, true ) 
        end 
    end 
) 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

جرب : )

Link to comment
  
Vehicles = {} 
VehicleM = createMarker ( 2681.791015625,-2325.9450683594, 3.0178125, "cylinder", 2, 0, 0, 0, 0 ) 
  
addEventHandler( "onMarkerHit", root, 
    function ( hitElement ) 
        if source == VehicleM and getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( 474, 730.21240234375, -2570.2185058594, 3.0261313915253 ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
            end 
        elseif source == ColorM and getElementType( hitElement) == "player" and isPedInVehicle( hitElement ) then 
            local player = getPedOccupiedVehicle( hitElement ) 
            setVehicleColor( player, math.random(255), math.random(255), math.random(255) ) 
            outputChatBox( "", hitElement, 0, 255, 0, true ) 
        end 
    end 
) 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

جرب : )

هريسة .. !

Link to comment
Vehicles = {} 
  
VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) 
  
  
addEventHandler( "onMarkerHit", root, 
    function ( hitElement ) 
        if source == VehicleM and getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) 
            end 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

Edited by Guest
Link to comment
Vehicles = {} 
  
VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) 
  
  
addEventHandler( "onMarkerHit", root, 
    function ( hitElement ) 
        if source == VehicleM and getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) 
            end 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

Link to comment
Vehicles = {} 
  
VehicleM = createMarker (احداثيات, "cylinder", 3, 255, 0, 0, 255 ) 
  
  
addEventHandler( "onMarkerHit", root, 
    function ( hitElement ) 
        if source == VehicleM and getElementType( hitElement ) == "player" then 
            if Vehicles[hitElement] and getElementType( Vehicles[hitElement] ) == "vehicle" then 
                destroyElement( Vehicles[hitElement] ) 
            end 
            local x,y,z = getElementPosition( hitElement ) 
            Vehicles[hitElement] = createVehicle ( رقم السيارة, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "الكلام الذي يطلع بالشات بعذ اخذ الموتر", hitElement, 255, 0, 0, true ) 
            end 
  
addEventHandler( "onVehicleExplode", root, 
    function( ) 
        setTimer( destroyElement, 2000, 1, source ) 
    end 
) 
  
addEventHandler( "onPlayerQuit", root, 
    function( ) 
        if Vehicles[source] then 
            destroyElement( Vehicles[source] ) 
        end 
    end 
) 

Link to comment

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...