Jump to content

Unbreakable object


an4rei

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...