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

I have a problem with addon script - OTX

abdala ragab

Veteran OT User
Joined
Aug 18, 2018
Messages
464
Solutions
12
Reaction score
343
Location
gamelaot.sytes.net
I have a problem with addon scriptIt doesn't work I used the xml source for many years and it was working fine in xml now i'm using otx latest version.

Lua:
function onUse(cid, item, frompos, item2, topos)
    local player = Player(cid)
    if getPlayerStorageValue(cid, 97022) == 1 then
        doPlayerSendCancel(cid, "Sorry, You Have Already Claimed Your Addons")
        return true
    elseif getPlayerSex(cid) == 0 then
        -- Female Addons Adder
        player:addOutfitAddon(137, 1) -- Citizen
        player:addOutfitAddon(737, 2)
    elseif getPlayerSex(cid) == 1 then
        -- Male Addons Adder
        player:addOutfitAddon(129, 1) -- Citizen
        player:addOutfitAddon(129, 2)
    else
        player:addOutfitAddon(129, 1) -- Citizen
        player:addOutfitAddon(129, 2)
    end

    doSendMagicEffect(getPlayerPosition(cid), 31)
    doSendAnimatedText(getPlayerPosition(cid), "Addons", TEXTCOLOR_RED)
    setPlayerStorageValue(cid, 97022, 1)
    return true
end

Console Error:
Code:
data/actions/scripts/addon system/hunter.lua:2:in function<data/actions/scripts/addon system/hunter.lua:1>
data/actions/scripts/addon system/hunter.lua:2:attemp to call global "pllayer,<a nil value> stack traceback
It's a statue when you click on it it gives you addon hunter
 
Last edited by a moderator:
By changing it to player....

You have already fixed it in the script you shared... says your error is for line 2. and on line two, you have player, instead of the error it says, pllayer.


You should literally be able to copy the script you shared here, and past it over the script you have, and the problem disappear
 
Back
Top