- Dołączył
- Grudzień 20, 2008
- Posty
- 1980
- Liczba reakcji
- 180
Witam, przedstawiam wam skrypt kt?ry polega na ukazaniu listy aktywnych gildi oraz ich cz?onk?w na ots.
talkactions\script
gildie.lua
talkactions.xml
LOG:
Dawajcie swoje propozycje ;s
talkactions\script
gildie.lua
PHP:
function onSay(cid, words, param, channel)
if param == '' then
local lista = db.getResult("SELECT `name` FROM `guilds`;")
if(lista:getID() ~= -1) then
local v = ''
repeat
v = v .. lista:getDataString("name") .. "\n"
until not lista:next()
lista:free()
doShowTextDialog(cid, 2529, v)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Nie istnieje jescze zadna gildia")
end
else
local id = getGuildId(param)
if id then
local lista = db.getResult("SELECT `name`, `rank_id` FROM `players` WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ");")
if(lista:getID() ~= -1) then
local v = ''
repeat
local rank = db.getResult("SELECT `name` FROM `guild_ranks` WHERE `id` = " .. lista:getDataInt("rank_id") .. " LIMIT 1;")
v = v .. lista:getDataString("name") .. " [" .. rank:getDataString("name") .. "]\n"
rank:free()
until not lista:next()
lista:free()
doShowTextDialog(cid, 2529, v)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "W tej Gildi nie ma ani 1 osobnika.")
end
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Taka gildia nie istnieje!.")
end
end
return TRUE
end
talkactions.xml
PHP:
<talkaction words="!gildie" script="gildie.lua"/>
LOG:
-W kolejnej wersji obok nickow i pozycji graczy bedzie tez ich profesja oraz level.
Dawajcie swoje propozycje ;s
i !gildie pokazuje gildie a ich czlonkow?
bo u mnie tego nie widac ;|.