blackberry Posted June 10, 2011 Posted June 10, 2011 My function : Tell if the player is inside or outside spawn , if inside, it takes out weapon when command is called spawnkill = createMarker(383.28732299805, 2538.4411621094, 15.459802627563 , 'checkpoint', 15, 255, 0, 0, 150) function spawnkill(thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, spawnkill) then takeAllWeapons ( thePlayer) outputChatBox("No Weapons Inside Spawn!", thePlayer, 255, 0, 0) else outputChatBox("You can kill!", thePlayer, 255, 0, 0) end end addCommandHandler("spawnkill", spawnkill) But wtf this error happen: Bad argument @ 'isElementWithinMaker'
Aibo Posted June 10, 2011 Posted June 10, 2011 because spawnkill is a function, not an element. and use [lua] tags. ?
Kenix Posted June 11, 2011 Posted June 11, 2011 spawnkillmarker = createMarker(383.28732299805, 2538.4411621094, 15.459802627563 , 'checkpoint', 15, 255, 0, 0, 150) function spawnkill(thePlayer, matchingDimension) if isElementWithinMarker(thePlayer, spawnkillmarker) then takeAllWeapons ( thePlayer) outputChatBox("No Weapons Inside Spawn!", thePlayer, 255, 0, 0) else outputChatBox("You can kill!", thePlayer, 255, 0, 0) end end addCommandHandler("spawnkill", spawnkill) http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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