Hi
nun habe ich ein Problem mit dem blöden KlickSystem
es macht nämlich einfach "garnichts", "nil","nichts!"
Das Script:
Lua
local ATM1 = createObject(2942, 2179.8999, 1966.40002, 10.4, 0, 0, 180)
function clickOnATM(theButton, theState, cPlayer, cPosX, cPosY, cPosZ)
if theButton == "left" and theState == "down" then
local eID = getElementID(source)
if(eID == "kmb_atm1") then
local pX, pY, pZ = getElementPosition(cPlayer)
local cDist = getDistanceBetweenPoints3D(pX, pY, pZ, cPosX, cPosY, cPosZ)
local mDist = 10
if(cDist <= mDist) then
outputChatBox("DU HAST ES ANGEKLICKT!")
end
end
end
end
addEventHandler ( "onElementClicked", getRootElement(), clickOnATM)
Alles anzeigen
Ich bin überfragt da er nichtmal eine Fehlermeldung oder ein Warning anzeigt....