• Car Paint at world spot
    3 replies, posted
i use this lua script folder lua/autorun/server/carpaint.lua [CODE]function PaintCar() for k,v in pairs(ents.FindInSphere(Vector(-6490.871094, -5898.073242, 128.031250), 10)) do if v:GetClass() == "prop_vehicle_jeep" then v:SetColor(Color(255,0,255,255)) end end end[/CODE] but when im in area nothing happens
Maybe it is a "prop_vehicle_jeep_old"
First you are stating a function but you haven't ran the function yet. You would have to do: [CODE]function consoletext(str) print(str) end consoletext("LoadedOnStart") [/CODE] It's because it only runs once when the server is started up or when the file is ran again. In your case just add: PaintCar() to the end of that file. When you enter the vector that you have posted it won't set your color because you would have to be there when the file runs. Alternates to make sure it will always set the color of the jeep to whatever color you choose is to use the Think hook or a timer.
Thanks i got it (= Close pls
Sorry, you need to Log In to post a reply to this thread.