Hi, i have this code but it doesn't work, no errors, no warnnings
Location - Area 51
local CP
local C2
local C3
local C1 = createMarker (307,1971,17, "checkpoint",3, 255, 30, 30, 255 )
addEventHandler( "onMarkerHit", C1,
function (hitElement, matchingDimension)
if getElementType( hitElement ) == "player" then
outputChatBox("Hei " .. getPlayerName(GetLocalPlayer()) .. ", there is a stair to help you cross thre fence, GO!")
C2 = createMarker (302,1902,17, "checkpoint",3, 255,100,100, 255 )
destroyElement(C1)
else
outputChatBox("test")
end
end
)
addEventHandler( "onMarkerHit", C2,
function(hitElement, matchingDimension)
if getElementType( hitElement ) == "player" then
outputChatBox("Now get up to the safezone! Arrows will guide you!")
C3 = createMarker (236,1927,17, "checkpoint",3, 30,255,30, 255 )
destroyElement(C2)
end
end
)
addEventHandler( "onMarkerHit", C3,
function(hitElement, matchingDimension)
if getElementType( hitElement ) == "player" then
outputChatBox("Suit up " .. getPlayerName(getLocalPlayer()) .. " for the fight!")
CP = createMarker ( 207.25,1931.25390625,22.33, "checkpoint",3, 0, 255, 30, 255 )
destroyElement(C3)
end
end
)
addEventHandler( "onMarkerHit", CP,
function(hitElement, matchingDimension)
if getElementType( hitElement ) == "player" then
local skin = {30,121,122,127}
setElementModel ( getLocalPlayer(), skin[math.random(1,4)] )
destroyElement(CP)
end
end
)
First marker is created, but looks like onMarkerHit doesn't work.
Edit #1 : Client-Side script
Can anyone help me with this?
Anyone?