Jump to content

Re: Multiple markers problem ...


Deepu

Recommended Posts

Sorry for double posting but this is urgent I mean really urgent !

Please help me again who is experienced at this ...

as per TAPL said

I used

if source == markerB then 

look this the test script

thePlayer = getLocalPlayer () 
local x,y,z = getElementPosition(thePlayer) 
  
local markerA = createMarker(x,y + 3,z, "cylinder", 2, 255, 2, 0) 
  
function makae (hitElement) 
   if hitElement == thePlayer then 
   local markerB = createMarker(x,y + 6,z, "cylinder", 2, 255, 2, 0) 
   end 
end 
addEventHandler("onClientMarkerHit", markerA, makae) 
  
function giga (hitElement) 
   if hitElement == thePlayer then 
     if source == markerB then 
     setElementHealth(thePlayer, 20) 
     end 
   end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), giga) 

please Help !

Please edit the full script and post the full script and thanks in advance :mrgreen:

Link to comment
local thePlayer = getLocalPlayer () 
local x, y, z = getElementPosition(thePlayer) 
  
local markerA = createMarker(x, y+3, z, "cylinder", 2, 255, 2, 0, 170) 
  
function makae (hitElement) 
   if hitElement == thePlayer then 
      markerB = createMarker(x,y + 6,z, "cylinder", 2, 255, 2, 0, 170) 
   end 
end 
addEventHandler("onClientMarkerHit", markerA, makae) 
  
function giga (hitElement) 
   if hitElement == thePlayer then 
      setElementHealth(thePlayer, 20) 
   end 
end 
addEventHandler("onClientMarkerHit", markerB, giga) 

Link to comment

it just says expected element at Argument 2 line 20 got nil

which means the markerB thing was created on markerA hit. The thing is that at the second function, the marker is not seen by the server

thats the problem

How to make the server realise that a marker was created on marker hit

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