Jump to content

getElementPosition error argument


BorderLine

Recommended Posts

hi everyone. Well i have a problem and i dont know why

i have this

function zomb(cplayer) 
x,y,z = getElementPosition(cplayer) 
exports [ "slothBot" ]:spawnBot ( x,y,z, 0, 10, 0, 0, Zombies, 0, "hunting", true ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), zomb) 

The problem is, error in argument of getElementPosition. say nill argument.

I try many ways but doesnt work.

Thanks for your time

Link to comment
function zomb(posX, posY, posZ) 
     exports["slothBot"]:spawnBot(posX, posY, posZ, 0, 10, 0, 0, Zombies, 0, "hunting", true) 
     -- Zombies is defined? it should be a team element. 
end 
addEventHandler("onPlayerSpawn", root, zomb) 

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