Search the Community
Showing results for tags 'hit'.
-
Hello Guis I Want Make Carball Testing So What The Codes That I Need? I Whish Any one Help Me
- 18 replies
-
- carball
- testingobject
-
(and 3 more)
Tagged with:
-
Hey Guys, For the last couple of hours I have been trying to get OnMarkerHit to trigger, I watched multiple youtube videos and tried using the search function here but none of them helped. The script is a server sided script, This is the code I am using: marker = createMarker(1514.5, -1678.2, 13, 'cylinder', 1.0, 19, 132, 38, 150) function markerHit(hitElement) setElementPosition(hitElement,0, 0, 0) outputChatBox("Hitting marker") end addEventHandler("onMarkerHit", marker , markerHit) But nothing happens, and I just don't know why. The object hitting the marker is a player. Hope someone can help me out. Greetings. misterk99
- 3 replies
-
- onmakerhit
- on
-
(and 2 more)
Tagged with:
-
function ccv (thePlayer) local accountname = getAccountName (getPlayerAccount(thePlayer)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then setTimer(function() ve1 = createVehicle ( 535, -2220.98706, -129.69173, 35.32031 ) ma1 = createMarker ( -2221.09668, -129.61031, 33.88103, "cylinder", 7.5, 255, 255, 0, 5 ) end, 1000, 1) end end addCommandHandler("ccvp", ccv) function marker1() destroyElement(ve1) destroyElement(ma1) end addEventHandler( "onMarkerHit", ma1, marker1) when i walk into the marker, nothing happens
-
function rablasletrehozasa() rablashelye = createMarker ( 252.3,-54.6,0.9, "cylinder", 1, 255, 255, 255, 170 ) outputChatBox("A kisboltot újra kitudjátok rabolni", root, r,g,b,true) end addEventHandler("onResourceStart",resourceRoot,rablasletrehozasa) function animaciovege(tp) setPedAnimation(tp,false) end function apenz(tp) local penz = math.random(100000,600000) givePlayerMoney( tp, penz ) outputChatBox("Gratulálok! Kiraboltad a boltot. Kaptál érte: "..penz.." Forintot!",tp,r,g,b,true) setTimer(apenz,7000,1,thePlayer) end function beleallas(thePlayer) if isElementWithinMarker(thePlayer, rablashelye) then outputChatBox("Írd be a rabláshoz, hogy /kirabol!",thePlayer,r,g,b,true) end end addEventHandler( "onMarkerHit", rablashelye, beleallas ) function kirabol(thePlayer) if isElementWithinMarker(thePlayer, rablashelye) then setPedAnimation ( thePlayer, "INT_HOUSE", "wash_up") setTimer(animaciovege,7000,1,thePlayer) setTimer(apenz,7000,1,thePlayer) destroyElement(rablashelye) else outputChatBox("Ez a parancs csak a kisboltban található markerben használható.") end end addCommandHandler("kirabol", kirabol)