Jump to content

ابي كود


Recommended Posts

وعليكم السلام

اهلين

  
  
Marker = createMarker(..............) 
  
setTimer(function() 
setMarkerColor (Marker, math.random(255), math.random(255), math.random(255), 255 ) ---- MarkerName, R, G, B , A 
end,2500,0) ----  Every 2.5 Sec Marker Color Change 
  
  
Link to comment

طيب يا اخي مثلا ماركر زي ده

Vehicles = {} 
  
ColorM = createMarker ( 148.98199462891, 1709.8217773438, 17.640625, "cylinder", 3, 46, 182, 19, 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 ( 507, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "", hitElement, 255, 0, 0, true ) 
            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 
) 
  
  

ده ماركر تلوين السياره

عايزو لون الماركر يكون متغير

اخليه كده

Vehicles = {} 
  
ColorM = createMarker ( 148.98199462891, 1709.8217773438, 17.640625, "cylinder", 3, 46, 182, 19, 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 ( 507, x, y, z ) 
            if Vehicles[hitElement] then 
                warpPedIntoVehicle( hitElement, Vehicles[hitElement] ) 
                outputChatBox( "", hitElement, 255, 0, 0, true ) 
            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 
) 
  
  
setTimer(function() 
setMarkerColor (Marker, math.random(255), math.random(255), math.random(255), 255 ) ---- MarkerName, R, G, B , A 
end,2500,0) ----  Every 2.5 Sec Marker Color Change 

صح ولا غلط بس انا مش عارف انا شلت الاكواد بتاعت اللون العاديه لاكن الماركر مظهرش

ياريت تعدلو عليه وتخلو لون الماركر يتغير

وشكرا

Link to comment
اخي طيب انت ما رديت علي والاكواد العاديه ايش اسوي فيها؟

اي اكواد عادية ؟

استبدل الكود القديم اللي اعطيتك وياه بالجديد

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