marker =createMarker(-23.4414,-55.150,1002.5468,"cylinder", 1.5, 250,0,0, 255 )
setElementInterior( marker,6,-23.4414,-55.150,1003.5468)
function output()
outputChatBox ( "*To Rob this shop use /robshop", getRootElement(), 255, 0, 0, true )
end
addEventHandler( "onMarkerHit", marker, output )
function rober(thePlayer, matchingDimension)
if isElementWithinMarker(thePlayer, marker) then
outputChatBox ( "robbery attempt success", getRootElement(), 0, 255, 0, true )
givePlayerMoney (thePlayer , 15000)
setPlayerWantedLevel ( thePlayer, 6 )
destroyElement ( marker )
else
outputChatBox("get in the marker to rob this shop", thePlayer, 255, 0, 0)
end
end
addCommandHandler("robshop", rober)
here is my code i want the player to be able to rob the shop once every 5min,