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

Dodawanie addonow do gracza

Daxu

Banned User
Joined
Jun 18, 2010
Messages
336
Reaction score
9
Location
Poland
jak zrobic aby za jednym zamachem miec na godzie dostepne 2 addony przy kazdym outficie?
 
LUA:
function onSay(cid, words, param, channel)
    return doPlayerAddAddons(cid, 3)
end
XML:
<talkaction words="!addon" access="5" event="script" value="addon.lua"/>

Chciałeś szybko to masz szybko i brzydko.
 
:/ i to jak brzydko ale ja nie prosilem brzydko only szybko XD
kto ma inny sposob :O

zapytanie do bazy ^^
 
Last edited:
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)

end
PHP:
<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)

end
PHP:
<action itemid="10140" event="script" value="addony.lua"/>

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.
 
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.

na godzie a nie godzine
 
@Topic
Autorze tematu, nie da się dodać addonów poprzez zapytanie do bazy danych.
 
Last edited by a moderator:
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?
 
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?
 
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.
 
Jak jestes taki chojny to rzucaj gotowce, ja tylko przyszedlem dac podpowiedz, heh.

Czytaj uważnie wątek, w którym odpowiadasz. Napisałem wyraźnie wcześniej, że twierdzę, że nie da się zrobić tego za pomocą zapytania.
 
Back
Top