Hallo, ich schaffe es nicht das man das Gate öffnen kann warum aber?
Lua
Aztecasgate = createObject(980, -1852.8994140625, -226.2998046875, 20.10000038147, 0, 0, 179.99450683594)
function aztecasgate_func(player, command)
tx,ty,tz = getElementPosition(Aztecasgate)
px, py, pz = getElementPosition(player)
if isAztecas (player) then
if (tonumber(px) <= tonumber(tx)+15) and (tonumber(px) >= tonumber(tx)-15) and (tonumber(py) <= tonumber(ty)+15) and (tonumber(py) >= tonumber(ty)-15) and (tonumber(pz) <= tonumber(tz)+20) and (tonumber(pz) >= tonumber(tz)-20) then
if tonumber(tz) == 110 then
moveObject( Aztecasgate, 2500, -1859.9000244141, -226.10000610352, 20.10000038147, 0, 0, 0)
elseif tonumber(tz) == 100 then
moveObject( Aztecasgate, 2500, -1852.8994140625, -226.2998046875, 20.10000038147, 0, 0, 179.99450683594, 0, 0, 0 )
end
end
end
end
addCommandHandler("gate", aztecasgate_func)
Alles anzeigen