Gabriele01 Posted July 18, 2017 Share Posted July 18, 2017 (edited) I'm making a new speedometer for my server. I need , when I'm get in the vehicle, speedometer need to start. How can I do that? I'm trying but doesn't work. if isPedInVehicle then dxDrawLinedRectangle(screenW-185, 700, 170, 22, tocolor(0, 0, 0, 255), true) dxDrawRectangle(screenW-185, 700, 170, 22, tocolor(0, 0, 0, 100), true) dxDrawRectangle(screenW-184, 701, 169/240, 21, tocolor(66, 133, 244, 230), true) dxDrawText("Hiz: "..vehicleSpeed.." km/h", (screenW*2)-290, 1408, 100, 20, tocolor(0, 0, 0, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) dxDrawText("Hiz: "..vehicleSpeed.." km/h", (screenW*2)-290, 1404, 100, 20, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) end end Edited July 18, 2017 by Gabriele01 Link to comment
Mohameddz Posted July 18, 2017 Share Posted July 18, 2017 Have you add script in Meta.xml? Meta.xml <meta> <info author="Your name" type="script" name="Your script name" /> <script src="client.lua" type="client" /> <meta> Link to comment
a7zan Posted July 18, 2017 Share Posted July 18, 2017 use this onClientVehicleEnter onClientVehicleExit Link to comment
Gabriele01 Posted July 18, 2017 Author Share Posted July 18, 2017 2 hours ago, Mohameddz said: Have you add script in Meta.xml? Meta.xml <meta> <info author="Your name" type="script" name="Your script name" /> <script src="client.lua" type="client" /> <meta> Yes,I have. 17 minutes ago, a7zan said: use this onClientVehicleEnter onClientVehicleExit I'll try it. Link to comment
a7zan Posted July 19, 2017 Share Posted July 19, 2017 ok do you add 'onClientRender' ??i think you need make it Link to comment
Gabriele01 Posted July 21, 2017 Author Share Posted July 21, 2017 On 19.07.2017 at 04:43, a7zan said: ok do you add 'onClientRender' ??i think you need make it This is piece of my script not all. Link to comment
koragg Posted July 22, 2017 Share Posted July 22, 2017 Required Arguments thePed: the ped you want to check. Try this: isPedInVehicle(localPlayer) Link to comment
Gabriele01 Posted July 22, 2017 Author Share Posted July 22, 2017 Okay, thats working now, I use 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