i found this on an earlier topic and tried editing...but the marker dosent even show up, any ideas?
function robmarkersetup()
robmarker = createMarker (359.31210327148, 161.29792785645, 1008.382812, "cylinder", 4.5, 255, 0, 0, 128, getRootElement())
setElementInterior (robmarker, 3)
setElementDimension (robmarker, 3)
end
addEventHandler("onResourceStart", getRootElement(), robmarkersetup)
function bankrob (hitPlayer, matchingDimension)
if (source == robmarker) then
if isTimer(robbank) then
cancelEvent()
outputChatBox("The Bank Is Allready Being Robbed", hitPlayer, 255, 255, 0)
else
outputChatBox ("****BANK ROB****", hitPlayer, 255, 0, 0, false)
outputChatBox ("Press X To Rob The Bank!", hitPlayer, 255, 0, 0, false)
outputChatBox ("You Must Wait Here And Not Die To Get The Cash!", hitPlayer, 255, 0, 0, false)
bindKey (hitPlayer, "x", "down", rob)
end
end
end
addEventHandler("onMarkerHit", getRootElement(), bankrob)
bankrob = {}
function rob (thePlayer, key, keystate)
if (key == "x") and (keystate == "down") then
outputChatBox ("***All Police To The Bank "..getPlayerName ( thePlayer ).. " Is Robbing The Bank*** ", getRootElement(), 255, 0, 0, false)
setPlayerWantedLevel ( thePlayer, 4 )
robbank = setTimer( robb, 100000, 1 )
end
end
function robb (thePlayer)
if (source ~= robmarker) then return else
givePlayerMoney ( thePlayer, math.random(50000, 100000) )
setPlayerWantedLevel ( thePlayer, 6 )
end
end
function death()
killTimer( robbank );
end
addEventHandler ( "onPlayerWasted", getRootElement(), death )
i would like it so when the player steps into the marker and presses x if there is not another player allready robbing the bank then it will start the robb timer and then the player will get some money at the end of the timer then it starts again, unless they die or get arrested or something.