Jump to content

Command only in marker


MatXpl

Recommended Posts

local marker1 = createMarker( 1599.6259765625, 1815.3583984375, 10.026741409302, 'cylinder', 2.0, 0, 250, 0, 150 ) 
  
function duty(thePlayer, matchingDimension) 
 if isElementWithinMarker(thePlayer, leczenie1) then 
    outputChatBox("/cm", thePlayer, 0, 255, 0) 
    addCommandHandler ("cm", bad) 
          end 
end 
  
  
function bad ( thePlayer ) 
  
        setElementHealth ( thePlayer, 200 ) 
end 
  

It shows marker, but command dosn't work...

Link to comment

WTF IS THIS?

This is first one and the last one I'm fixing something for you - just to let you know the correct way. But dude - learn scripting. Read THE BASICS until you get them, don't skip anything.

You CAN'T just put random words and willing it to work. What is "leczenie1", when you are triggering this ugly function called "duty"?

ONE -- BIG -- MESS.

  
local marker1 = createMarker( 1599.6259765625, 1815.3583984375, 10.026741409302, 'cylinder', 2.0, 0, 250, 0, 150 ) 
  
function bad(playerSource, command) 
  if isElementWithinMarker(playerSource) then 
    outputChatBox("/cm", playerSource, 0, 255, 0) -- this one is weird - to "display" entered command, but whatever 
    setElementHealth(playerSource, 200) 
  end 
end 
addCommandHandler("cm", bad) 
  

now: CLICK HERE ** CLICK HERE ** CLICK HERE

And if you ignore what I wrote and reply only "thanks" or even nothing.. argh..

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