Jump to content

Re: Multiple markers problem ...


Deepu

Recommended Posts

Posted

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:

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

Yeah :D it says expected element at argument 2 got nil at event Handler line 20

which means the server thinks that marker B is not created -_-

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

Where is the marker at line 20 ?

i mean

addEventHandler("onClientMarkerHit", getRootElement(), giga) 

Where do you define that the player has to hit the markerB.

i'm sorry if im wrong.

Posted
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) 

Omerta Roleplay

Posted

Doesnt work wassim :(

It used to work but now I am having errors

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

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

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

Worked ! close the topic please xD I am a mad guy man :D I had put source == markerB where marker B is in local :D

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

Posted

also thanks friends for making me think :D and of course for helping me ;)

WANT SCRIPTS? I SELL LIKE AN ANIMATED CUSTOMISED GUI FOR 5USD AND AN RPG GAMEMODE FOR 30USD ONLY. IF YOU NEED SPECIAL SCRIPTS THEN I SELL EACH FOR 5 USD.

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