Jump to content

IsElementWithinMarker bug


Tails

Recommended Posts

Ok, I created a little script from https://wiki.multitheftauto.com/wiki/IsE ... thinMarker

I can see the marker and when i type /duty it says "You are not at the right place!". Ok, thats good. But when I am inside the marker and type /duty I still get the message: "You are not at the right place!". What's going on?

Help is much appreciated!

XML:

<script src="script3.lua" type="server" /> 

Script:

dutymarker = createMarker(126.56, 254.98, 78.9, 'cylinder', 2.0, 255, 0, 0, 150) 
  
function duty(thePlayer, matchingDimension) 
 if isElementWithinMarker(thePlayer, dutymarker) then 
    giveWeapon(thePlayer, 22, 100, 1)   
 else 
    outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) 
 end 
end 
addCommandHandler("duty", duty) 

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