an4rei Posted March 21, 2016 Share Posted March 21, 2016 I've assigned a dff to a object(1645 ,some weird bed ) and then done the next thing: local fgt = createObject ( 1645,-810.13623046875, 2535.4724121094, 96.055953979492 -0.7, 0, 0, 0 ) setObjectBreakable(fgt, false) problem is , the object still evaporates(some small spark in the middle of some really white smoke , probably from the shaders I'm using) after 1 hit . Link to comment
swedishboy Posted March 22, 2016 Share Posted March 22, 2016 try this, if i understood you right local fgt = createObject ( 1645,-810.13623046875, 2535.4724121094, 96.055953979492 ) if isObjectBreakable(fgt) then setObjectBreakable(fgt, false) end Link to comment
EstrategiaGTA Posted March 22, 2016 Share Posted March 22, 2016 Are you sure you have added this script as a client-side script? try this, if i understood you right local fgt = createObject ( 1645,-810.13623046875, 2535.4724121094, 96.055953979492 ) if isObjectBreakable(fgt) then setObjectBreakable(fgt, false) end This will do nothing, but add a useless line. Add this to your script: function this ( ) local fgt = createObject (arguments) setTimer (setObjectBreakable, 1000, 1, false) end addEventHandler("onClientResourceStart", resourceRoot, this) Link to comment
swedishboy Posted March 22, 2016 Share Posted March 22, 2016 Yes ofc i added it on client-side.. and works perfect, also i did not add the addEventHandler or the function() because he only want the codes and i think he know how to do it by himself.. Also you forgot to add ''fgt'' at line 3 setTimer (setObjectBreakable, 1000, 1, fgt, false) Link to comment
an4rei Posted March 22, 2016 Author Share Posted March 22, 2016 fixed it few hours ago , thank you. 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