Jump to content

Zombie proof


dewu

Recommended Posts

Posted

Hi guys.

I have that script:

  
RestricLocation["location1"] = {-212.60000610352,1451.5,95.800003051758} 
RestricLocation["location2"] = {-277.20001220703,1509.5,75} 
  
function ResourceStart( ) 
    setElementData (RestricLocation, "zombieProof", true) 
end 
  

I don't know why, it's not working and zombies can enter proof area ;/

Posted

You are trying to set a element data value to a table, that won't work, setElementData is used on events.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

So if I do that..

  
RestricLocation["location1"] = {-212.60000610352,1451.5,95.800003051758} 
RestricLocation["location2"] = {-277.20001220703,1509.5,75} 
setElementData (RestricLocation, "zombieProof", true) 
  

it will work?

@EDIT

Okay, it works ;) Thanks.

Posted

That's the same thing...

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

I'm not sure if you read the code correctly: he's trying to SET element data to a TABLE, not store a TABLE into element data.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Looks like I didn't read it correctly then, that also explains the illusion of how the script seems to work @dewu, tables are also elements, so you may be able to assign a value to them, however finding that value when it's needed would be more complicated, since you still have to use a solution like what Saml1er wrote above.

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...