Jump to content

HOW TO CREAT ONE TELEPORT MAKER?


Try

Recommended Posts

Posted (edited)

I created one maker teleport but don't go the maker don't show in map this is the code

____________________________________________________________________________

fly = createMaker(1686,-2434,14,"cylinder",1.5,0,255,0). 
createBlipAttched(fly,41) 
  
function maker(player) 
    if source == fly and getElementType(player) == "player" then 
    setElementPosition(player,1688,-2425,14) 
    end 
end 
addEventHandler("onMakerHit",getResourceRootElement(getThisResource()),maker) 

____________________________________________________________________________

i mean its cuz this createBlipAttched(fly,41) this don't create the blip and i mean cuz this don't go

Can you Help me? :fadein:

Edited by Guest
Posted

You can't put anything as function name, this has some errors.

fly = createMaker(1686,-2434,14,"cylinder",1.5,0,255,0) 
createBlipAttachedTo(fly,41) 
  
function maker(player,matchingDimension) 
    if source == fly and getElementType(player) == "player" then 
    setElementPosition(player,1688,-2425,14) 
    end 
end 
addEventHandler("onMakerHit",getRootElement(),maker) 

try that.

Posted

I tested what Solidsnake14 said but nothing i see in other server this code i posted and i changed createBlipAttched << this to this >> createBlipAttchedTo and nothing

Posted
fly = createMarker(1686,-2434,12.5,"cylinder",1.5,0,255,0). 
createBlipAttchedTo(fly,41) 
  
function marker(player) 
    if source == fly and getElementType(player) == "player" then 
    setElementPosition(player,0,0,3) 
    end 
end 
addEventHandler("onMakerHit",getResourceRootElement(getThisResource()),maker) 

Posted (edited)

1. use code=lua tags!

2. only 1 fault, it's that your grammar sucks (sorry about that, but it's the true)

fly = createMarker(1686,-2434,12.5,"cylinder",1.5,0,255,0). 
createBlipAttachedTo(fly,41) 
  
function marker(player) 
    if source == fly and getElementType(player) == "player" then 
    setElementPosition(player,0,0,3) 
    end 
end 
addEventHandler("onMakerHit",getResourceRootElement(getThisResource()),marker) --it's MARKER, not maker 

Edited by Guest
Posted

Nothing good

i solve all but continue don't creating the blip and not teleporting

fly = createMarker(1686,-2434,12.5,"cylinder",1.5,0,255,0). 
createBlipAttachedTo(fly,41) 
  
function marker(player) 
    if source == fly and getElementType(player) == "player" then 
    setElementPosition(player,0,0,3) 
    end 
end 
addEventHandler("onMakerHit",getResourceRootElement(getThisResource()),maker) 
  

Posted (edited)

What about this?

fly = createMarker(1686,-2434,12.5,"cylinder",1.5,0,255,0). 
createBlipAttachedTo(fly,41) 
  
addEventHandler("onMakerHit",fly, 
function ( p ) 
if getElementType(p) == "player" then 
    setElementPosition(p,0,0,3) 
end) 
end 
  

Edited by Guest
Posted

The Kid your code don't worked :'(

Only 2 question WHY DON"T GO and NEED ADD MORE FILES?

I only putted the meta, script.lua and need one image??????

Posted

LOL I forgot something in that code ^^

fly = createMarker(1686,-2434,12.5,"cylinder",1.5,0,255,0). 
createBlipAttachedTo(fly,41) 
  
addEventHandler("onMakerHit",fly, 
function ( p ) 
if getElementType(p) == "player" then 
    setElementPosition(p,0,0,3) 
end) 
end 
  

  • MTA Team
Posted

Instead of "attching" it you should create the blip instead, doesnt look like there is any need since It doesnt look like you want the "maker" to move.

Posted

The kid Again no!

but wait i solving the problem

i found one people go help me!

please don't close this after i go edit this topic and put the correct code :)

Posted

OK THE CODE NOW WORK AND ITS DONE

Marker = createMarker (1686,-2434,12.6,"cylinder", 1.5, 0, 255, 0, getRootElement() ) 
  
function MarkerHit ( hitElement, dimension ) 
    if source == Marker then 
        if getElementType ( hitElement ) == "player" then 
            setElementPosition ( hitElement, 1686,-2434,1000) 
        end 
    end 
end 
  
addEventHandler ( "onMarkerHit", getRootElement(), MarkerHit ) 
  

THIS WORK ;D

Cya Later!

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