Hi! i'm a complete newbie so i dont know too much about scripting (almost anything)
i would like a script so you can use a door only once.
this is the script i tried to make (copied from arenaquest doors)
and i though to put something like this somewhere but IDK --setPlayerStorageValue(cid,6667,1)--
Thanks For Helping
i would like a script so you can use a door only once.
this is the script i tried to make (copied from arenaquest doors)
function onUse(cid, item, fromPosition, itemEx, toPosition)
local cidPosition = getCreaturePosition(cid)
if item.actionid ~= 35532 then
if (item.actionid == 35532 and getPlayerStorageValue(cid,6667) == -1)
then
if cidPosition.x < toPosition.x then
doTeleportThing(cid,
{x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid,
{x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not
enter room.")
return TRUE
end
elseif (item.actionid == 35532 and getPlayerStorageValue(cid,6667) == -1) then
if cidPosition.x < toPosition.x then
doTeleportThing(cid,
{x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
else
doTeleportThing(cid,
{x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
end
return TRUE
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You must pay
first.")
return TRUE
end
return FALSE
end
and i though to put something like this somewhere but IDK --setPlayerStorageValue(cid,6667,1)--
Thanks For Helping