Jump to content

تعديل كود


Recommended Posts

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

  
TableCars = {} 
  
addEvent('gvoa', true) 
addEventHandler('gvoa', root, 
function( nameCar ) 
if isElement( TableCars[source] ) then 
destroyElement( TableCars[source] ) 
end 
local id = getVehicleModelFromName( nameCar ) 
if id == 487 or id == 548 then 
local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) 
TableCars[source] = createVehicle( 497, 1250.6, -1679.2, 36.8 ) 
if not TableCars[source] then 
return end 
warpPedIntoVehicle ( source, TableCars[source] ) 
return end 
local x,y,z = getElementPosition( source ) 
TableCars[source] = createVehicle( id, x,y,z ) 
if not TableCars[source] then 
return end 
warpPedIntoVehicle ( source, TableCars[source] )   
addVehicleUpgrade(TableCars[source], 1147) 
addVehicleUpgrade(TableCars[source], 1041) 
addVehicleUpgrade(TableCars[source], 1035) 
addVehicleUpgrade(TableCars[source], 1010) 
addVehicleUpgrade(TableCars[source], 1171) 
addVehicleUpgrade(TableCars[source], 1149) 
setVehiclePaintjob(TableCars[source], 1) 
end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement( TableCars[source] ) then 
        destroyElement( TableCars[source] ) 
    end 
end 
) 
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
 function(player,seat) 
if getElementData( player, 'gang' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Police' then return end 
    if seat == 0 then 
    outputChatBox(" " .. groupName .. " أملاك خاصة لقوات التدخل السريع", player, 255, 0, 0, true) 
    cancelEvent() 
  end 
end 
) 

Link to comment
  
TableCars = {} 
  
addEvent('gvoa', true) 
addEventHandler('gvoa', root, 
function( nameCar ) 
if isElement( TableCars[source] ) then 
destroyElement( TableCars[source] ) 
end 
local id = getVehicleModelFromName( nameCar ) 
if id == 487 or id == 548 then 
local x, y, z = unpack( AircraftIdSpawn[math.random(#AircraftIdSpawn)] ) 
TableCars[source] = createVehicle( 497, 1250.6, -1679.2, 36.8 ) 
if not TableCars[source] then 
return end 
warpPedIntoVehicle ( source, TableCars[source] ) 
return end 
local x,y,z = getElementPosition( source ) 
TableCars[source] = createVehicle( id, x,y,z ) 
if not TableCars[source] then 
return end 
warpPedIntoVehicle ( source, TableCars[source] )   
addVehicleUpgrade(TableCars[source], 1147) 
addVehicleUpgrade(TableCars[source], 1041) 
addVehicleUpgrade(TableCars[source], 1035) 
addVehicleUpgrade(TableCars[source], 1010) 
addVehicleUpgrade(TableCars[source], 1171) 
addVehicleUpgrade(TableCars[source], 1149) 
setVehiclePaintjob(TableCars[source], 1) 
setVehicleColor( TableCars, 0, 255, 0 ) 
  
end 
) 
  
addEventHandler('onPlayerQuit', root, 
function() 
    if isElement( TableCars[source] ) then 
        destroyElement( TableCars[source] ) 
    end 
end 
) 
addEventHandler("onVehicleStartEnter", getResourceRootElement(getThisResource()), 
 function(player,seat) 
if getElementData( player, 'gang' ) == groupName and getPlayerTeam( player ) and getTeamName( getPlayerTeam( player ) ) == 'Police' then return end 
    if seat == 0 then 
    outputChatBox(" " .. groupName .. " سيارة خاصة بقوات التدخل السريع", player, 255, 0, 0, true) 
    cancelEvent() 
  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...