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 !
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
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.
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
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'
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
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,,
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.").
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 !
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