• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Help With Car Script!

Super Nova

A Sad Alien
Joined
Mar 23, 2010
Messages
352
Reaction score
1
Location
Nizhnekamsk / Russia
Hello, i have downloaded this car script. But when i say !car it says "Sorry, you are not in a car." So i look at the id of the car.

ID :
12550
12551
12552

None of those items exist.

What do i do?


Script :

Code:
local storages = {isMoving = 12550, direction = 12551, speed = 12552}

function onSay(cid, words, param)
        local status =
        {
            isMoving = getPlayerStorageValue(cid, storages.isMoving),
            direction = getPlayerStorageValue(cid, storages.direction),
            speed = getPlayerStorageValue(cid, storages.speed)
        }
        local controls =
        {
            ["up"] = {storage = storages.direction, new = 3, txt = "up"},
            ["down"] = {storage = storages.direction, new = 4, txt = "down"},
            ["left"] = {storage = storages.direction, new = 1, txt = "left"},
            ["right"] = {storage = storages.direction, new = 2, txt = "right"},
            ["speedup"] = {storage = storages.speed, new = status.speed - 50, txt = "fast"},
            ["speeddown"] = {storage = storages.speed, new = status.speed + 50, txt = "slow"},
            ["stop"] = {storage = storages.direction, new = -1, txt = "stop"}
        }
        if status.isMoving == 1 then
                local ctrl = controls[param]
                if ctrl then
                        setPlayerStorageValue(cid, ctrl.storage, ctrl.new)
                        doCreatureSay(cid, ctrl.txt, TALKTYPE_SAY)
                else
                        doSendMagicEffect(getPlayerPosition(cid), 2)
                        doPlayerSendCancel(cid, "Invalid operation.")
                end
        else
                doPlayerSendCancel(cid, "You are not in a car.")
        end
        return TRUE
end


All credits to the rightful owner.
 
Hello, i have downloaded this car script. But when i say !car it says "Sorry, you are not in a car." So i look at the id of the car.

ID :
12550
12551
12552

None of those items exist.

What do i do?


Script :

Code:
local storages = {isMoving = 12550, direction = 12551, speed = 12552}

function onSay(cid, words, param)
        local status =
        {
            isMoving = getPlayerStorageValue(cid, storages.isMoving),
            direction = getPlayerStorageValue(cid, storages.direction),
            speed = getPlayerStorageValue(cid, storages.speed)
        }
        local controls =
        {
            ["up"] = {storage = storages.direction, new = 3, txt = "up"},
            ["down"] = {storage = storages.direction, new = 4, txt = "down"},
            ["left"] = {storage = storages.direction, new = 1, txt = "left"},
            ["right"] = {storage = storages.direction, new = 2, txt = "right"},
            ["speedup"] = {storage = storages.speed, new = status.speed - 50, txt = "fast"},
            ["speeddown"] = {storage = storages.speed, new = status.speed + 50, txt = "slow"},
            ["stop"] = {storage = storages.direction, new = -1, txt = "stop"}
        }
        if status.isMoving == 1 then
                local ctrl = controls[param]
                if ctrl then
                        setPlayerStorageValue(cid, ctrl.storage, ctrl.new)
                        doCreatureSay(cid, ctrl.txt, TALKTYPE_SAY)
                else
                        doSendMagicEffect(getPlayerPosition(cid), 2)
                        doPlayerSendCancel(cid, "Invalid operation.")
                end
        else
                doPlayerSendCancel(cid, "You are not in a car.")
        end
        return TRUE
end


All credits to the rightful owner.

If that ids don't exist change them.
 
Back
Top