Jump to content

طلب كود


yazan

Recommended Posts

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

طيب جرب هذا

Veh = getPedOccupiedVehicle ( player ) 
  
addCommandHandler ( "car", 
    function ( thePlayer, cmd ) 
        x, y, z = getElementPosition ( thePlayer ) 
        theVehicle = createVehicle ( 404, x, y + 3, z ) 
        createBlipAttachedTo ( theVehicle, 55 ) 
    end 
) 
  
addEventHandler( "onVehicleStartEnter", root, 
    function ( player, seat ) 
        if ( getElementType ( Player ) == "player" ) and ( Seat == 0 ) then 
            if( getPlayerSerial ( player ) ~= "BAEE69A296DB2EDECC91449721FC56A1" ) then 
                if ( Veh == 404 ) then 
                    cancelEvent ( ) 
                    outputChatBox ( "* ~][ سياره خاصه ب يـز ـن ][~", player, 255, 255, 0, true ) 
                else 
                    outputChatBox( "", player, 0, 0, 0, false ) 
                end 
            else 
                outputChatBox ( "* ~][ مرحبا بيك يا يزن في سيارت الخاصه ][~", player, 255, 0, 0, true ) 
                setVehicleDamageProof(theVehicle, true) 
            end 
        end 
    end 
)   

:mrgreen: إن شاء الله يشتغل

Link to comment
  
  
addCommandHandler ( "car", 
    function ( thePlayer, cmd ) 
        x, y, z = getElementPosition ( thePlayer ) 
        theVehicle = createVehicle ( 404, x, y + 3, z ) 
        createBlipAttachedTo ( theVehicle, 55 ) 
        local sr = getPlayerSerial(thePlayer) 
        return setElementData ( thePlayer, "serial", sr) 
    end 
) 
  
addEventHandler ( "onVehicleStartEnter", root, 
    function ( thePlayer, theSeat ) 
        if source == theVehicle then 
        local serial = getPlayerSerial(thePlayer) 
        local data = getElementData ( thePlayer, "serial" ) 
            if data == serial then 
                outputChatBox ( "* ~][ مرحبا بيك يا يزن في سيارت الخاصه ][~", thePlayer, 255, 0, 0, true ) 
                setVehicleDamageProof(theVehicle, true) 
            else 
                cancelEvent ( ) 
                outputChatBox ( "* ~][ سياره خاصه ب يـز ـن ][~", thePlayer, 255, 255, 0, true )           
            end 
        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...