Szerző Téma: Nem akar működni - kapusystemesdi  (Megtekintve 439 alkalommal)

Nem elérhető isti9

Nem akar működni - kapusystemesdi
« Dátum: 2016. Július 05. - 00:28:05 »
0 Show voters
nem tudom pontosan mi a gond, miért nem akar működni.
 
local gatez = { 
[1] = {777.96893, -1330.16602, 15.74773, 0, 0, 0, 5000, 971},
[2] = {1987.83349, -1844.27551, 5.98437, 0, 0, 50, 5000, 971},
--[3] = {x, y, z, rotx, roty, rotz, movingSpeed, modelID},
}
local info = {
gate = {},
gate2 = {},
--gate3 = {},
}
function loadGatez()
info.gate[1], info.gate[2], info.gate[3], info.gate[4], info.gate[5], info.gate[6], info.gate[7], info.gate[8] = unpack(gatez[1])
info.gate2[1], info.gate2[2], info.gate2[3], info.gate2[4], info.gate2[5], info.gate2[6], info.gate2[7], info.gate2[8] = unpack(gatez[2])
gate_ = createObject(info.gate[8], info.gate[1], info.gate[2], info.gate[3], info.gate[4], info.gate[5], info.gate[6])
gate_2 = createObject(info.gate2[8], info.gate2[1], info.gate2[2], info.gate2[3], info.gate2[4], info.gate2[5], info.gate2[6])
addCommandHandler(\"opengate\", useNAVSideParkGate)
end
addEventHandler(\"onResourceStart\", root, loadGatez)
---innentől rossz
function useNAVSideParkGate (thePlayer, commandName, password)
local x, y, z = getElementPosition(thePlayer)      
local distance1 = getDistanceBetweenPoints3D(777.96893, -1330.16602, 15.74773, x, y, z)
if distance1 <= 25 then
function handleGate(player, command, string)
if (not string) then
   outputChatBox(\"Meg kell adnod a jelszót, hogy kinyithasd ezt a kaput.\", player, 255, 0, 0)
elseif (string == \"123\") and isElement(gate_) then
   moveObject(gate_, info.gate[7], (info.gate[1] -8.5), info.gate[2], info.gate[3])
   setTimer(
     function() moveObject(gate_, info.gate[7],  info.gate[1], info.gate[2], info.gate[3]) outputChatBox(\"A kapu záródik, vigyázz!...\", player, 255, 255, 0) end, 10000, 1)
   outputChatBox(\"Jelszó elfogadva! A kapu most nyílik...\", player, 0, 255, 0)
elseif (string == \"456\") and isElement(gate_2) then
   moveObject(gate_2, info.gate2[7], info.gate2[1], info.gate2[2], (info.gate2[3] + 6))
   setTimer(function() moveObject(gate_2, info.gate2[8], info.gate2[1], info.gate2[2], info.gate2[3]) outputChatBox(\"A kapu záródik, vigyázz!...\", player, 255, 255, 0) end, 10000, 1)
   outputChatBox(\"Jelszó elfogadva! A kapu most nyílik...\", player, 0, 255, 0)
end
end
else outputChatBox(\"rossz a vlaami\", player, 0, 255, 0)
end
end

 
Kérdésem lenne a probléma forrása és esetleg a megoldás
« Utoljára szerkesztve: 2016. Július 05. - 00:32:29 írta anGeL »

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal