Jump to content

ابي كودات


Recommended Posts

--#Client 
addEventHandler("onClientGUIClick", root, 
function() 
    if source == CheakBox and guiCheckBoxGetSelected(CheckBox) == true then 
    Timer = setTimer(function() 
    triggerServerEvent("VehicleColor", localPlayer) 
    end, 500, 0) 
    elseif source == CheakBox and guiCheckBoxGetSelected(CheckBox) == false then 
    killTimer(Timer) 
    end 
end) 
--#Server 
addEvent("VehicleColor", true) 
addEventHandler("VehicleColor", root, 
function() 
local vehicle = getPedOccupiedVehicle(source) 
if not isPedInVehicle(source) then outputChatBox("You Must be in a vehicle first!!", source, 255, 0, 0, true) return end 
setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255)) 
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...