• 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!

Aol Script

Joined
Jul 9, 2022
Messages
41
Solutions
1
Reaction score
5
GitHub
Daniel
when i try to buy aol it's tell me you don't have enough money and i already have money
does anyone know what the problem is?
1657663423641.png
 
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerAddItem(cid, 2173, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
doCreatureSay(cid, "!aol", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, 'You don\'t have enough money.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end
Post automatically merged:

If you post the code we might.
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerAddItem(cid, 2173, 1)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
doCreatureSay(cid, "!aol", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, 'You don\'t have enough money.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FLAMEAREA)
end
end
 
LUA:
function onSay(cid, words, param)
    local price = 10000
    if getPlayerMoney(cid) < price then
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        doPlayerSendCancel(cid, 'You don\'t have enough money. You need '.. price ..' gold coins to purchase Amulet of Loss.')
        return true
    end

    doPlayerRemoveMoney(cid, price)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You succesfully purchased Amulet of Loss!')
    doPlayerAddItem(cid, 2173, 1)
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
    doCreatureSay(cid, "!aol", TALKTYPE_ORANGE_1)
    return true -- here : "return true" or "return false" to avoid yellow message..
end
 
Last edited:
LUA:
function onSay(cid, words, param)
    local price = 10000
    if getPlayerMoney(cid) < price then
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
        doPlayerSendCancel(cid, 'You don\'t have enough money. You need '.. price ..' gold coins to purchase Amulet of Loss.')
        return true
    end

    doPlayerRemoveMoney(cid, price)
    doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You succesfully purchased Amulet of Loss!')
    doPlayerAddItem(cid, 2173, 1)
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA)
    doCreatureSay(cid, "!aol", TALKTYPE_ORANGE_1)
end
ty worked now <3
but why my name spam yellow colour
but why 1657673635631.png
 
Dunno, I didn't used 0.X engine for like 10 years. Try add "return" [true or false (try it by yourself, because I don't have TFS 0.X on PC)] before last "end".
I edited the script, try now.
 
Dunno, I didn't used 0.X engine for like 10 years. Try add "return" [true or false (try it by yourself, because I don't have TFS 0.X on PC)] before last "end".
I edited the script, try now.
same :( np bro
anyway thankyou for helping
i can change to 1.4 TFS?maybe iam using 0.3.4
 
Back
Top