αвυ-wαleed Posted March 26, 2014 Share Posted March 26, 2014 ابغى احط كل السيارات لون موحد 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
αвυ-wαleed Posted March 26, 2014 Author Share Posted March 26, 2014 ابغى تعديل لاهنتوا سويت مانفع Link to comment
αвυ-wαleed Posted March 26, 2014 Author Share Posted March 26, 2014 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
abu5lf Posted March 26, 2014 Share Posted March 26, 2014 setVehicleColor( TableCars[ source ], 0, 255, 0 ) حطها تحت كود انشاء السيارة P.S: داخل من جوال Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now