Ich will das ich durch den Marker fahre, 150$ kriege und es gespeichert wird das ich den nicht nochmal sammeln kann. Das script sieht jz so aus.
Lua
------------Marker------------
marker1 = createMarker (2491.6999511719, -1666.0999755859, 13.300000190735, "corona", 1, 0, 255, 0, 255)
function earnmarker1 (thePlayer)
local account = getPlayerAccount (thePlayer)
if setAccountData (account, "h2bfun.marker", marker1)
else isElementWithinMarker (thePlayer, marker1)
setPlayerMoney (thePlayer, 150)
outputChatBox ("You find a marker, now you earned $150!", 255, 255, 255, false)
end
end
addEventHandler ("onMarkerHit", marker1, earnmarker1)
Alles anzeigen