BorderLine Posted September 28, 2012 Posted September 28, 2012 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
Vision Posted September 29, 2012 Posted September 29, 2012 Try this function zomb() local x, y, z = getElementPosition(source) exports [ "slothBot" ]:spawnBot ( x, y, z, 0, 10, 0, 0, Zombies, 0, "hunting", true ) end addEventHandler ( "onPlayerSpawn", getRootElement(), zomb)
BorderLine Posted September 29, 2012 Author Posted September 29, 2012 i did too, but still same error
TAPL Posted September 29, 2012 Posted September 29, 2012 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)
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