• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

need Help in !buyaddons Script

melegy

Devils
Joined
Dec 5, 2012
Messages
178
Reaction score
2
Location
Egypt
Hi, Otlander's

I"m need your help in this script, !buyAddons [command] when you say !buyaddons you got it :) . Understand, My bad English.
 
You mean get full addons?? or for example: !buyaddon assassin
and tell me if it cost money or cost item or for free..
you should explain what you asking about..
 
Go To Server/Data/Talkaction/Scripts Make a New Xml File Add this Code ---Warning Don't Change Anything----
then go to data/talkactions/talkactions And Add the Small Code

Then You Are Done


Code:
function onSay(cid, words, param) 
local pos = getCreaturePosition(cid)
				if(getPlayerSex(cid) == 0) == TRUE then
					doPlayerAddOutfit(cid,136,137,138,139,140,141,142,147,148,149,150, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 336, 367, 1)
					doPlayerAddAddons(cid, 2)
					doPlayerAddAddons(cid, 1)
					doSendAnimatedText(pos, "Addons", 24)
					doSendMagicEffect(getPlayerPosition(cid), 18)
				else 
				if (getPlayerSex(cid) == 1) then
					doPlayerAddOutfit(cid,129, 130, 131, 132, 133, 134, 143,144, 145, 146, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 335, 366, 1)
					doPlayerAddAddons(cid, 2)
					doPlayerAddAddons(cid, 1)
					doSendAnimatedText(pos, "Addons", 24)
					doSendMagicEffect(getPlayerPosition(cid), 18)
				end 
				end
				end

Code:
<talkaction words="!buyaddons" event="script" value="addons.lua"/>
 
Last edited:
thanks Tetra20, but it's do no work ERROR


date/talkactions/scripts/addons.lua:12: attempt to call gobal 'doplayeraddaddons' <a nil value>
 
LUA:
function onSay(cid, words, param)
local function doPlayerAddAddons(cid, addon)
    for i = 0, #maleOutfits do
        doPlayerAddOutfit(cid, maleOutfits[i], addon)
    end
    for i = 0, #femaleOutfits do
        doPlayerAddOutfit(cid, femaleOutfits[i], addon)
    end
end
    for i = 1, 2 do
        doPlayerAddAddons(cid, i)
    end
    doSendAnimatedText(getPlayerPosition(cid), "Addons", 24)
    doSendMagicEffect(getPlayerPosition(cid), 18)
    return true
end
 
Last edited:
@Stream your script got a little bug at the end i fixed working script
Code:
function onSay(cid, words, param)
local function doPlayerAddAddons(cid, addon)
    for i = 0, #maleOutfits do
        doPlayerAddOutfit(cid, maleOutfits[i], addon)
    end
    for i = 0, #femaleOutfits do
        doPlayerAddOutfit(cid, femaleOutfits[i], addon)
    end
end
    for i = 1, 2 do
        doPlayerAddAddons(cid, i)
    end
    doSendAnimatedText(getPlayerPosition(cid), "Addons", 24)
    doSendMagicEffect(getPlayerPosition(cid), 18)
	end
    return true
 
@Stream your script got a little bug at the end i fixed working script
Code:
function onSay(cid, words, param)
local function doPlayerAddAddons(cid, addon)
    for i = 0, #maleOutfits do
        doPlayerAddOutfit(cid, maleOutfits[i], addon)
    end
    for i = 0, #femaleOutfits do
        doPlayerAddOutfit(cid, femaleOutfits[i], addon)
    end
end
    for i = 1, 2 do
        doPlayerAddAddons(cid, i)
    end
    doSendAnimatedText(getPlayerPosition(cid), "Addons", 24)
    doSendMagicEffect(getPlayerPosition(cid), 18)
    end
    return true

you are doin it wrong bro... and yes, my code has a bug but with ur code, you dont solve it.
 
Back
Top