Follow along with the video below to see how to install our site as a web app on your home screen.
Notka: This feature may not be available in some browsers.
[LUA]local storages = {isMoving = 12550, direction = 12551, speed = 12552}
local SpeedMeter = {Default = 800, Max = 0, Min = 2500}
function tileChecker(pos, type_)
local myTable = {}
if (type(pos) == 'table') then
for i = 1, 5 do
pos.stackpos = i
local Thing = getThingFromPos(pos)
local thisID, thisUID = Thing.itemid, Thing.uid
if thisID > 1 then
if type_ == "itemID" then
table.insert(myTable, thisID)
elseif type_ == "itemUID" then
table.insert(myTable, thisUID)
end
end
end
end
return #myTable > 0 and myTable or nil
end
local function findItem(pos, t)
if (type(pos) == 'table' and type(t) == 'table') then
for _i, i in ipairs(tileChecker(pos, "itemID")) do
if isInArray(t, i) then
pos.stackpos = _i
ret = getThingFromPos(pos).uid
break
end
end
end
return ret
end
function moveCar(x)
if x.Dir ~= -1 then
doCreateItem(isInArray({1, 2}, x.Dir) == TRUE and 7267 or 7266, 1, x.nPos)
doTeleportThing(x.cid, x.nPos, FALSE)
doRemoveItem(findItem(x.pos, {7266, 7267}))
end
end
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
local status =
{
isMoving = getPlayerStorageValue(cid, storages.isMoving),
direction = getPlayerStorageValue(cid, storages.direction),
speed = getPlayerStorageValue(cid, storages.speed)
}[/LUA]
no i wpisy
[LUA]<movevent type="StepIn" itemid="7267" event="script" value="car.lua"/>[/LUA]
i drugi :
[LUA]<talkaction words="car" script="car.lua"/>[/LUA]
Znalaz?em ten skrypt, ale nie dzia?a bo auto nie chce jecha? chocia? nie wywala ?adnych b??d?w w konsoli ;/