function onSay(cid, words, param, channel)
return doPlayerAddAddons(cid, 3)
end
<talkaction words="!addon" access="5" event="script" value="addon.lua"/>
function onUse(cid, item, frompos, item2, topos)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a new outfit!")
doPlayerAddOutfit(cid, 136, 1)
doPlayerAddOutfit(cid, 137, 1)
doPlayerAddOutfit(cid, 138, 1)
doPlayerAddOutfit(cid, 139, 1)
doPlayerAddOutfit(cid, 140, 1)
doPlayerAddOutfit(cid, 141, 1)
doPlayerAddOutfit(cid, 142, 1)
doPlayerAddOutfit(cid, 147, 1)
doPlayerAddOutfit(cid, 148, 1)
doPlayerAddOutfit(cid, 149, 1)
doPlayerAddOutfit(cid, 150, 1)
doPlayerAddOutfit(cid, 155, 1)
doPlayerAddOutfit(cid, 156, 1)
doPlayerAddOutfit(cid, 157, 1)
doPlayerAddOutfit(cid, 158, 1)
doPlayerAddOutfit(cid, 252, 1)
doPlayerAddOutfit(cid, 269, 1)
doPlayerAddOutfit(cid, 270, 1)
doPlayerAddOutfit(cid, 279, 1)
doPlayerAddOutfit(cid, 288, 1)
doPlayerAddOutfit(cid, 324, 1)
doPlayerAddOutfit(cid, 366, 1)
doPlayerAddOutfit(cid, 336, 1)
doPlayerAddOutfit(cid, 128, 2)
doPlayerAddOutfit(cid, 129, 2)
doPlayerAddOutfit(cid, 130, 2)
doPlayerAddOutfit(cid, 131, 2)
doPlayerAddOutfit(cid, 132, 2)
doPlayerAddOutfit(cid, 133, 2)
doPlayerAddOutfit(cid, 134, 2)
doPlayerAddOutfit(cid, 143, 2)
doPlayerAddOutfit(cid, 144, 2)
doPlayerAddOutfit(cid, 145, 2)
doPlayerAddOutfit(cid, 146, 2)
doPlayerAddOutfit(cid, 151, 2)
doPlayerAddOutfit(cid, 152, 2)
doPlayerAddOutfit(cid, 153, 2)
doPlayerAddOutfit(cid, 154, 2)
doPlayerAddOutfit(cid, 251, 2)
doPlayerAddOutfit(cid, 268, 2)
doPlayerAddOutfit(cid, 273, 2)
doPlayerAddOutfit(cid, 278, 2)
doPlayerAddOutfit(cid, 289, 2)
doPlayerAddOutfit(cid, 325, 2)
doPlayerAddOutfit(cid, 335, 2)
doPlayerAddOutfit(cid, 367, 2)
end
<action itemid="10140" event="script" value="addony.lua"/>
addony.lua
PHP:function onUse(cid, item, frompos, item2, topos) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a new outfit!") doPlayerAddOutfit(cid, 136, 1) doPlayerAddOutfit(cid, 137, 1) doPlayerAddOutfit(cid, 138, 1) doPlayerAddOutfit(cid, 139, 1) doPlayerAddOutfit(cid, 140, 1) doPlayerAddOutfit(cid, 141, 1) doPlayerAddOutfit(cid, 142, 1) doPlayerAddOutfit(cid, 147, 1) doPlayerAddOutfit(cid, 148, 1) doPlayerAddOutfit(cid, 149, 1) doPlayerAddOutfit(cid, 150, 1) doPlayerAddOutfit(cid, 155, 1) doPlayerAddOutfit(cid, 156, 1) doPlayerAddOutfit(cid, 157, 1) doPlayerAddOutfit(cid, 158, 1) doPlayerAddOutfit(cid, 252, 1) doPlayerAddOutfit(cid, 269, 1) doPlayerAddOutfit(cid, 270, 1) doPlayerAddOutfit(cid, 279, 1) doPlayerAddOutfit(cid, 288, 1) doPlayerAddOutfit(cid, 324, 1) doPlayerAddOutfit(cid, 366, 1) doPlayerAddOutfit(cid, 336, 1) doPlayerAddOutfit(cid, 128, 2) doPlayerAddOutfit(cid, 129, 2) doPlayerAddOutfit(cid, 130, 2) doPlayerAddOutfit(cid, 131, 2) doPlayerAddOutfit(cid, 132, 2) doPlayerAddOutfit(cid, 133, 2) doPlayerAddOutfit(cid, 134, 2) doPlayerAddOutfit(cid, 143, 2) doPlayerAddOutfit(cid, 144, 2) doPlayerAddOutfit(cid, 145, 2) doPlayerAddOutfit(cid, 146, 2) doPlayerAddOutfit(cid, 151, 2) doPlayerAddOutfit(cid, 152, 2) doPlayerAddOutfit(cid, 153, 2) doPlayerAddOutfit(cid, 154, 2) doPlayerAddOutfit(cid, 251, 2) doPlayerAddOutfit(cid, 268, 2) doPlayerAddOutfit(cid, 273, 2) doPlayerAddOutfit(cid, 278, 2) doPlayerAddOutfit(cid, 289, 2) doPlayerAddOutfit(cid, 325, 2) doPlayerAddOutfit(cid, 335, 2) doPlayerAddOutfit(cid, 367, 2) endPHP:<action itemid="10140" event="script" value="addony.lua"/>
for _, outfit in ipairs(maleOutfits) do
doPlayerAddOutfit(cid, outfit, 3)
end
for _, outfit in ipairs(femaleOutfits) do
doPlayerAddOutfit(cid, outfit, 3)
end
Jak juz to:
Code:for _, outfit in ipairs(maleOutfits) do doPlayerAddOutfit(cid, outfit, 3) end for _, outfit in ipairs(femaleOutfits) do doPlayerAddOutfit(cid, outfit, 3) end
Ale i tak on chcial na godzine, wiec spierdalaj z tym.
@Topic
Autorze tematu, nie da się dodać addonów poprzez zapytanie do bazy danych.
A gdzie on napisał, że chce zapytaniem dodać?
:/ i to jak brzydko ale ja nie prosilem brzydko only szybko XD
kto ma inny sposob :O
zapytanie do bazy ^^
@Topic
Autorze tematu, nie da się dodać addonów poprzez zapytanie do bazy danych.
Outfity gracza są zapisywane w bazie danych, dokładniej w storage.
No chyba że się mylę ;<
Nie mylisz się, ale w jaki sposób chcesz dodać te addony?
Zwykle INSERT INTO `player_storages` ;p
Wiadomo, że INSERT jak coś wprowadzasz, ale jakie storage będą miały poszczególne addony do poszczególnych outfitów?
Definitions.h masz chyba zdefiniowane poczatkowe storage.
Ale to nie jest odpowiedź na prośbę autora tematu, on prosił o zapytanie do bazy.
Wez zobacz czy tam mozg jeszcze masz w tym lbie, ty spytales o storage to Ci powiedzialem, a?
Ok, ale mogłeś przy okazji podać mu zapytanie o które prosił, jeśli twierdzisz ze za pomocą zapytania da się dodać wszystkie addony, a?
Jak jestes taki chojny to rzucaj gotowce, ja tylko przyszedlem dac podpowiedz, heh.