abdala ragab
Veteran OT User
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.
Console Error:
It's a statue when you click on it it gives you addon hunter
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
Last edited by a moderator: