Witam czy mo?e mi kto? powiedzie? dlaczego ten skrypt nie dzia?a, i poprawi? jak mo?na?
[LUA]function onUse(cid, item, frompos, item2, topos)
local exhausted_seconds = 15
local exhausted_storagevalue = 1267
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if item.uid == 8999 then
if isZombieActive() ~= 1 then
doPlayerSendTextMessage(cid, 22, "Musisz poczekac az zombie sie zacznie!")
else
topos = {x=1282, y=255, z=6}
doPlayerSendTextMessage(cid, 22, "Jestes na zombie!")
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doTeleportThing(cid,topos)
end
else
doPlayerSendTextMessage(cid, 22, "Posagu mozna uzywac co godzine!")
end
end
return 1
end
[/LUA]
[LUA]function onUse(cid, item, frompos, item2, topos)
local exhausted_seconds = 15
local exhausted_storagevalue = 1267
if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
if item.uid == 8999 then
if isZombieActive() ~= 1 then
doPlayerSendTextMessage(cid, 22, "Musisz poczekac az zombie sie zacznie!")
else
topos = {x=1282, y=255, z=6}
doPlayerSendTextMessage(cid, 22, "Jestes na zombie!")
setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
doTeleportThing(cid,topos)
end
else
doPlayerSendTextMessage(cid, 22, "Posagu mozna uzywac co godzine!")
end
end
return 1
end
[/LUA]