FuriouZ Posted March 19, 2013 Posted March 19, 2013 Hey! I downloaded script called 'hud_messages' from community ,but i don't understand how use it . I viewed this topic ...but still nothing ... So ,i need that for example ,if i die ,then it says in hud messages 'Venom died !' or somethin... Thanks for helping ! Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
FuriouZ Posted March 19, 2013 Author Posted March 19, 2013 (edited) ok no one don't help me .. I explain more. I have resource 'car locks' function toggleVehicleLocked(thePlayer) playervehicle=getPlayerOccupiedVehicle(thePlayer); if(playervehicle) then if(isVehicleLocked(playervehicle)) then setVehicleLocked(playervehicle,false); exports.hud_messages:showBox(Vehicle unlocked), player, 0, 255, 0, 200) else setVehicleLocked(playervehicle,true); exports.hud_messages:showBox(Vehicle locked), player, 255, 0, 0, 200) end end end What is wrong here ? Edited March 19, 2013 by Guest Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Moderators IIYAMA Posted March 19, 2013 Moderators Posted March 19, 2013 It should work, unless the player don't get send. Or the hudmessages isn't running. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
FuriouZ Posted March 19, 2013 Author Posted March 19, 2013 (edited) It should work, unless the player don't get send. Or the hudmessages isn't running. But it doesn't ,hudm_messages running... i cheked debugscript ,no errors ,also script is server-side I really need it EDIT: Debugscript says something in line 25: ')' expected near 'unlocked' ? Edited March 19, 2013 by Guest Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
iPrestege Posted March 19, 2013 Posted March 19, 2013 function toggleVehicleLocked(thePlayer) playervehicle = getPlayerOccupiedVehicle(thePlayer); if (playervehicle) then if (isVehicleLocked(playervehicle)) then setVehicleLocked(playervehicle,false); exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) else setVehicleLocked(playervehicle,true); exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) end end end
FuriouZ Posted March 19, 2013 Author Posted March 19, 2013 function toggleVehicleLocked(thePlayer) playervehicle = getPlayerOccupiedVehicle(thePlayer); if (playervehicle) then if (isVehicleLocked(playervehicle)) then setVehicleLocked(playervehicle,false); exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) else setVehicleLocked(playervehicle,true); exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) end end end Doesn't work Debug says .lua:25: ')' expected near 'unlocked' Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Anderl Posted March 19, 2013 Posted March 19, 2013 exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) http://lua-users.org/wiki/StringsTutorial "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
FuriouZ Posted March 19, 2013 Author Posted March 19, 2013 exports.hud_messages:showBox(Vehicle unlocked.,thePlayer, 0, 255, 0, 200) exports.hud_messages:showBox(Vehicle locked.,thePlayer, 255, 0, 0, 200) http://lua-users.org/wiki/StringsTutorial i'm so dumb,to understand it ... Just please repair it someone ,then if it is fixed i understand Thanks,, Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Anderl Posted March 19, 2013 Posted March 19, 2013 The first argument in the function should be a string but you didn't use the quotation marks (you wrote Vehicle locked. but it should be "Vehicle locked."). "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
FuriouZ Posted March 19, 2013 Author Posted March 19, 2013 The first argument in the function should be a string but you didn't use the quotation marks (you wrote Vehicle locked. but it should be "Vehicle locked."). FINALLY ! THANK YOU SO MUCH FOR HELPING ! Homepage @ http://rageresources.blogspot.com/ Offical Facebook @ https://www.facebook.com/pages/Rage-Scr ... fref=photo
Anderl Posted March 19, 2013 Posted March 19, 2013 You're welcome. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
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