Szerző Téma: Gate próblém  (Megtekintve 888 alkalommal)

Gate próblém
« Dátum: 2016. Október 25. - 14:42:53 »
0 Show voters
Sziasztok egy gate systemen belül van egy kis próblémám van két kapum az eggyik működik a másik már nem
Működő:
 
local objGateg = createObject(980, 1953.5999755859, -790.29998779297, 143.30000305176, 0, 0, 107.99011230469)
exports.pool:allocateElement(objGateg)
 
local open = false
-- Gate code
function kinyit(thePlayer)
local x, y, z = getElementPosition(thePlayer)
local distance = getDistanceBetweenPoints3D(1953.5999755859, -790.29998779297, 143.30000305176, x, y, z)
 if (exports.global:hasItem(thePlayer, 4, 2002)) then
if (distance<=7) and (open==false) then
   open = true
   exports.global:sendLocalMeAction(thePlayer, \"kinyit egy közelben lévő kaput.\")
   moveObject(objGateg, 500, 1953.5999755859, -790.29998779297, 137.30000305176, 0, 0, 0)
   else
if (exports.global:hasItem(thePlayer, 4, 2002)) then
   if (distance<=7) and (open==true) then
   moveObject(objGateg, 500, 1953.5999755859, -790.29998779297, 143.30000305176, 0, 0, 0)
   open = false
   exports.global:sendLocalMeAction(thePlayer, \"bezár egy közelben lévő kaput.\")
   end
   end
   end
end
end
addCommandHandler(\"birtokgate\", kinyit)

 
Nem jó:
 
local objGateg = createObject(980, 1245.5999755859, -767.29998779297, 93.800003051758, 0, 0, 0)
exports.pool:allocateElement(objGateg)
 
local open = false
-- Gate code
function kinyit(thePlayer)
local x, y, z = getElementPosition(thePlayer)
local distance = getDistanceBetweenPoints3D(1245.5999755859, -767.29998779297, 93.800003051758, x, y, z)
 if (exports.global:hasItem(thePlayer, 4, 2002)) then
if (distance<=7) and (open==false) then
   open = true
   exports.global:sendLocalMeAction(thePlayer, \"kinyit egy közelben lévő kaput.\")
   moveObject(objGateg, 500, 1245.5999755859, -767.29998779297, 87.800003051758, 0, 0, 0)
   else
if (exports.global:hasItem(thePlayer, 4, 2002)) then
   if (distance<=7) and (open==true) then
   moveObject(objGateg, 500, 1245.5999755859, -767.29998779297, 93.800003051758, 0, 0, 0)
   open = false
   exports.global:sendLocalMeAction(thePlayer, \"bezár egy közelben lévő kaput.\")
   end
   end
   end
end
end
addCommandHandler(\"gate\", kinyit)

 
Hogy tudnám megcsinálni ?

Gate próblém
« Válasz #1 Dátum: 2016. Október 25. - 18:51:54 »
0 Show voters
Nekem is volt már ilyen probléma egybe buggolt nálam a kettő
a

function kinyit(thePlayer)

 nél a kinyit-ot írd át valami másra meg a legalján is van egy ilyen kinyit azt is írd át amire a felsőt is átírtad

Gate próblém
« Válasz #2 Dátum: 2016. Október 26. - 17:21:44 »
0 Show voters
Még most sem jelenik meg a kapu!

Gate próblém
« Válasz #3 Dátum: 2016. Október 26. - 19:37:00 »
0 Show voters
Egy fájlba vannak? Ha nem , akkor bele vannak írva a META-ba?

Nem elérhető Eduka

  • 214
    • Profil megtekintése
Gate próblém
« Válasz #4 Dátum: 2016. Október 26. - 21:15:03 »
0 Show voters
local objGateg = createObject(980, 1245.5999755859, -767.29998779297, 93.800003051758, 0, 0, 0)
exports.pool:allocateElement(objGateg)
 
local open = false
-- Gate code
function kinyit(thePlayer)
        local x, y, z = getElementPosition(thePlayer)
        local distance = getDistanceBetweenPoints3D(1245.5999755859, -767.29998779297, 93.800003051758, x, y, z)
               
if (exports.global:hasItem(thePlayer, 4, 2002)) then
   if (distance<=7) and (open==false) then
      open = true
                exports.global:sendLocalMeAction(thePlayer, \"kinyit egy közelben lévő kaput.\")
                moveObject(objGateg, 500, 1245.5999755859, -767.29998779297, 87.800003051758, 0, 0, 0)
   elseif (distance<=7) and (open==true) then
      moveObject(objGateg, 500, 1245.5999755859, -767.29998779297, 93.800003051758, 0, 0, 0)
      open = false
      exports.global:sendLocalMeAction(thePlayer, \"bezár egy közelben lévő kaput.\")
   end
end
    end
end
addCommandHandler(\"gate\", kinyit)

 
Legközelebb használj debugscriptet.
Nincs tesztelve!

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal