Jump to content

Why the hell this error happen?


Recommended Posts

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'

Link to comment
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) 

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