Jump to content

شوفو الكود صحيح


Recommended Posts

-- Server Side # 
local Vehicle = {} 
  
function CreateVehicle(Player) 
  if isElement( Vehicle[Player] ) then return end 
        local x, y, z = getElementPosition (  Player  ) 
            Vehicle[Player] = createVehicle ( 411, x+4, y+4, z ) 
                outputChatBox ( 'تم إنشآء آلسيآرة', Player, 255, 0 , 0, true) 
end 
  
for k,v in ipairs ( getElementsByType ( 'player' ) ) do 
    bindKey( v, '8', 'down', CreateVehicle ) 
end 
  
addEventHandler( 'onPlayerJoin', root,function() 
    bindKey( source, '8', 'down', CreateVehicle ) 
    end 
) 
  
addEventHandler ( 'onVehicleExplode', resourceRoot, function () 
    destroyElement ( source ) 
    end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement ( Vehicle[source] ) then 
        destroyElement( Vehicle[source] ) 
            Vehicle[source] = nil 
    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...