Outfity i addony.

Status
Zamknięty.

daderga

Active User
Zarejestrowany
Dołączył
Listopad 5, 2009
Posty
62
Liczba reakcji
1
Prosze o pomoc, chodzi o to ?eby npc nie dawali addon?w je?eli nie ma danego outfita.My?la?em,?e mo?e co? takiego :
getPlayerlookType(cid,nr. look typa)
lub
getPlayerOutfitId (cid,id outfita)
.Niestety to i to (i wiele innych)nie chodzi.
Jeszcze raz prosz? o pomoc.
 
Odp: Outfity i addony.

Od?wierzam! Nikt nie pomo?e?
 
Ostatnia edycja:
Odp: Outfity i addony.

PHP:
local look = getCreatureOutfit(cid)
if look.looktype == xxx then
W miejsce xxx wpisz looktype jakie ma mie? player funkcja wzieta z tfs 0.4, gdy? tej pierwszej co poda?e? nie znalaz?em w nim.
 
Odp: Outfity i addony.

Niestety nie chodzi, otrzymalem addon nie posiadaj?c outfita (tz.look typa).
Czyli co? nie tak.W silniku wywala cos takiego
Npc/script/npc.lua attempt to call global "isPlayerlookType"<a nil value>
stack traceback
Mo?e ?le to wklejam przykladowy npc,gdzie mam to wkleic??
function AssassinSecond(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
return false
end

if isPremium(cid)
if getPlayerStorageValue(cid,sassassin) == -1 then
if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 then
if doPlayerRemoveItem(cid,5804,1) and doPlayerRemoveItem(cid,5930,1) then
npcHandler:say('Ah, right! The assassin katana! Here you go.')

doSendMagicEffect(getCreaturePosition(cid), 13)
setPlayerStorageValue(cid,sassassin,1)
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, 152, 2)
elseif getPlayerSex(cid) == 0 then
doPlayerAddOutfit(cid, 156, 2)
end
end
else
selfSay(noitems2)
end
else
selfSay(already)
end
end

end
My?la?em ?e kolo isPremium
 
Ostatnia edycja:
Odp: Outfity i addony.

Jest taka funkcja w og?le w silniku isPlayerLooktype? bo w?tpie w to
dodaj to za is premium i nast?pnie za
Kod:
selfSay(already)
end
dodaj kolejne end je?li nie doda?e? i je?li nie masz tej funkcji, kt?rej poda?em to spr?buj getPlayerLooktype zamiast getCreatureOutfit.

PS. Jestem pocz?tkuj?cym skrypterem Lua wi?c nie jestem pewny.
 
Odp: Outfity i addony.

Teraz ?adnych b??d?w nie wywala, ale nie daje addona (mam outfita )
 
Ostatnia edycja:
Odp: Outfity i addony.

Kod daj?cy addon, dodatkowo sprawdzaj?cy czy na pewno gracz posiada outfit
Kod:
function AssassinSecond(cid, message, keywords, parameters, node)

if(not npcHandler:isFocused(cid)) then
	return false
end

if isPremium(cid)
	--if getPlayerStorageValue(cid,sassassin) == -1 then	
	if canPlayerWearOutfit(cid, 152, 2) or canPlayerWearOutfit(cid, 156, 2) then
		selfSay(already, cid)
	else
		if getPlayerItemCount(cid,5804) >= 1 and getPlayerItemCount(cid,5930) >= 1 then
			if doPlayerRemoveItem(cid,5804,1) and doPlayerRemoveItem(cid,5930,1) then 
				if(canPlayerWearOutfit(cid, 152) or canPlayerWearOutfit(cid, 156)) then
					selfSay('Ah, right! The assassin katana! Here you go.', cid)
					doSendMagicEffect(getCreaturePosition(cid), 13)
					-- setPlayerStorageValue(cid,sassassin,1)
					if getPlayerSex(cid) == 1 then 
						doPlayerAddOutfit(cid, 152, 2)
					elseif getPlayerSex(cid) == 0 then
						doPlayerAddOutfit(cid, 156, 2)
					end
				else
					selfSay("You don't have an assassin outfit", cid)
				end
			else
				selfSay(noitems2, cid)
			end
		else
			selfSay(noitems2, cid)
		end
	end
else
	selfSay("I support only premium customers", cid)
end

end
 
Ostatnia edycja:
Odp: Outfity i addony.

Dzi?kuje za odpowied? ,chodzi temat do zamkni?cia, rep+
 
Ostatnia edycja:
Status
Zamknięty.
Back
Do góry