What's new

?ciana na d?wigni?

Status
Not open for further replies.

xorbi123

User
Joined
Jun 8, 2010
Messages
26
Reaction score
0
Siemka, potrzebuj? skrypt na sciane ktora znika gdy przestawi si? d?wigni?. S? sciany ktore znikaja na kilka sek a ja potrzebuje taka sciane . Dam +
 

Vvex

Banned
Joined
Jun 28, 2009
Messages
460
Reaction score
91
Odp: ?ciana na d?wigni?

Code:
function onUse(cid, item, frompos, item2, topos)
local config = {
timeToRemove = 20, -- czas po jakim czasie sciana si? pojawia
cancelmesage = "Przepraszam, Niemozliwe!", -- wiadomo?? gdy nie mo?na postawi? lub usun?? ?ciany
sciana = X, -- id ?ciany kt?ra ma si? pojawia?
gatepos = {x=x, y=y, z=z, stackpos=1}, -- pozycia sciany, je?eli chcesz by kilka ?cia? si? usuwa?o to dopisujesz tutaj:gatepos = {x=XXX, y=XXX, z=8, stackpos=1},
 (pod t? linijk?).
}
local params = {pos = config.gatepos, id = 6284}
getgate = getThingfromPos(config.gatepos)
if getgate.itemid == config.sciana and item.itemid == 1945 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,1945)
elseif getgate.itemid == 0 and item.itemid == 1945 then
addEvent(doWall, config.timeToRemove * 1000, params)
doTransformItem(item.uid,1946)
elseif getgate.itemid == 0 and item.itemid == 1946 then
doTransformItem(item.uid,1945)
addEvent(doWall, config.timeToRemove * 1000, params)
elseif getgate.itemid == config.sciana and item.itemid == 1946 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,1945)
else
doPlayerSendCancel(cid,config.cancelmesage)
end
return TRUE
end
function doWall(params)
local item = doCreateItem(6284,1,params.pos)
return TRUE
end
 

xorbi123

User
Joined
Jun 8, 2010
Messages
26
Reaction score
0
Odp: ?ciana na d?wigni?

No wlasnie to widzialem , ale mi chodzi ze naciskam dzwignie i sciana znika na zawsze.
 

Vvex

Banned
Joined
Jun 28, 2009
Messages
460
Reaction score
91
Odp: ?ciana na d?wigni?

Code:
function onUse(cid, item, frompos, item2, topos)
local config = {
cancelmesage = "Przepraszam, Niemozliwe!", -- wiadomo?? gdy nie mo?na postawi? lub usun?? ?ciany
sciana = X, -- id ?ciany kt?ra ma si? pojawia?
gatepos = {x=x, y=y, z=z, stackpos=1}, -- pozycia sciany, je?eli chcesz by kilka ?cia? si? usuwa?o to dopisujesz tutaj:gatepos = {x=XXX, y=XXX, z=8, stackpos=1},
 (pod t? linijk?).
}
local params = {pos = config.gatepos, id = 6284}
getgate = getThingfromPos(config.gatepos)
if getgate.itemid == config.sciana and item.itemid == 1945 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,1945)
elseif getgate.itemid == 0 and item.itemid == 1945 then
doTransformItem(item.uid,1946)
elseif getgate.itemid == 0 and item.itemid == 1946 then
doTransformItem(item.uid,1945)
elseif getgate.itemid == config.sciana and item.itemid == 1946 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,1945)
else
doPlayerSendCancel(cid,config.cancelmesage)
end
return TRUE
end
function doWall(params)
local item = doCreateItem(6284,1,params.pos)
return TRUE
end

Znika na zawsze.
 

xorbi123

User
Joined
Jun 8, 2010
Messages
26
Reaction score
0
Odp: ?ciana na d?wigni?

a jeszcze pytanie, jaka dzwignie i czy jej pozycje czy cos tez musze podawac , bo mi cos nie dziala?
 
Status
Not open for further replies.
Top