• logo_cipsoft
    Nowe serwery zostały otwarte 19 Lut 2025:
    Noctalia (Open PvP) Ignitera (Open PvP) us_logo Xybra (Open PvP)

Aukcje offline

Status
Zamknięty.

Sassin

Forum friend
Dołączył
Czerwiec 13, 2009
Posty
1281
Liczba reakcji
105
Par? dni temu przeszukiwa?em otland i znalaz?em co? interesuj?cego wiec chc? Wam to udost?pni?.
Skrypt autorstwa vDk z otlandu.

Wszystko wygl?da mniej, wi?cej tak:
14wmrl.png


Do bazy danych Dodaj:

ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0';

CREATE TABLE `auction_system` (
`id` int(11) NOT NULL auto_increment,
`player` int(11),
`item_id` int(11),
`item_name` varchar(255),
`count` int(11),
`cost` int(11),
`date` int(11),
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Do talkactions.xml Dodaj

<talkaction words="!offer" event="script" value="auctionsystem.lua"/>

talkactions/scripts/auctionsystem.lua
--[[
Offline player to player item trader (Auction System) by vDk
Script version: 1.1a
]]--
local config = {
levelRequiredToAdd = 20,
maxOffersPerPlayer = 3,
SendOffersOnlyInPZ = false,
blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933}
}
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end

local t = string.explode(param, ",")
if(t[1] == "add") then
if((not t[2]) or (not t[3]) or (not t[4])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
return true
end

if(not tonumber(t[3]) or (not tonumber(t[4]))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.")
return true
end

if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.")
return true
end

local item = getItemIdByName(t[2], false)
if(not item) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
return true
end

if(getPlayerLevel(cid) < config.levelRequiredToAdd) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.")
return true
end

if(isInArray(config.blocked_items, item)) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.")
return true
end

if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item.")
return true
end

local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";")
if(check:getID() == -1) then
elseif(check:getRows(true) >= config.maxOffersPerPlayer) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")")
return true
end

if(config.SendOffersOnlyInPZ) then
if(not getTilePzInfo(getPlayerPosition(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.")
return true
end
end

doPlayerRemoveItem(cid, item, (tonumber(t[4])))
db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. t[4] .. ", " .. t[3] ..", " .. os.time() .. ")")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. t[4] .." " .. t[2] .." for " .. t[3] .. " gps to offerts database.")
end

if(t[1] == "buy") then
if(not tonumber(t[2])) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
return true
end

local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
if(buy:getID() ~= -1) then
if(getPlayerMoney(cid) < buy:getDataInt("cost")) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.")
buy:free()
return true
end

if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.")
buy:free()
return true
end

if(isItemStackable((buy:getDataString("item_id")))) then
doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))
else
for i = 1, buy:getDataInt("count") do
doPlayerAddItem(cid, buy:getDataString("item_id"), 1)
end
end

doPlayerRemoveMoney(cid, buy:getDataInt("cost"))
db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You buy " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!")

local seller = getPlayerByNameWildcard(getPlayerNameByGUID(buy:getDataInt("player")))
if(seller) then
doPlayerAddMoney(seller, buy:getDataInt("cost"))
doPlayerSendTextMessage(seller, MESSAGE_INFO_DESCR, "Someone buy your " .. buy:getDataString("item_name") .. ". You get " .. buy:getDataInt("cost") .. " gps.")
else
db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";")
end
buy:free()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
end
end

if(t[1] == "remove") then
if((not tonumber(t[2]))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
return true
end

local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
if(delete:getID() ~= -1) then
if(getPlayerGUID(cid) == delete:getDataInt("player")) then
db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
if(isItemStackable(delete:getDataString("item_id"))) then
doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
else
for i = 1, delete:getDataInt("count") do
doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
end
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.")
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!")
end
delete:free()
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
end
end
return true
end

teraz creaturescripts/login.lua

local auction = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")
if(auction:getDataInt("auction_balance") > 0) then
doPlayerAddMoney(cid, auction:getDataInt("auction_balance"))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You sold item on auction, you get " .. auction:getDataInt("auction_balance") .. " gps.")
db.executeQuery("UPDATE `players` SET `auction_balance` = 0 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
auction:free()
end

Teraz tylko acc...
w folderze z acc tworzymy plik auctionsystem.php, a w nim

<?PHP
$auctions = $SQL->query('SELECT `auction_system`.`player`, `auction_system`.`id`, `auction_system`.`item_name`, `auction_system`.`item_id`, `auction_system`.`count`, `auction_system`.`cost`, `auction_system`.`date`, `players`.`name` FROM `auction_system`, `players` WHERE `players`.`id` = `auction_system`.`player` ORDER BY `auction_system`.`id` DESC')->fetchAll();
$players = 0;

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Instruction<b></TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD><center><h2>Commands</h2><b>!offer add, itemName, itemPrice, itemCount</b><br /><small>example: !offer add, plate armor, 500, 1</small><br /><br /><B>!offer buy, AuctionID</b><br /><small>example: !offer buy, 1943</small><br /><br /><b>!offer remove, AuctionID</b><br /><small>example: !offer remove, 1943</small></center></TR></TD></TABLE><br />';
if(empty($auctions))
{
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b>Auctions</b></td></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD>Currently is no one active Auction.</TD></TR></TABLE>';
$main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>';
}
else
{
foreach($auctions as $auction) {
$players++;
if(is_int($players / 2))
$bgcolor = $config['site']['lightborder'];
else
$bgcolor = $config['site']['darkborder'];
$cost = round($auction['cost']/1000, 2);
$content .= '<TR BGCOLOR='.$bgcolor.'><TD><center>'.$auction['id'].'</center></TD><TD><center><img src="http://otland.net/images/items/'.$auction['item_id'].'.gif"/></center></TD><TD><center>'.$auction['item_name'].'</center></TD><TD><center><a href="?subtopic=characters&name='.urlencode($auction['name']).'">'.$auction['name'].'</a></center></TD><TD><center>'.$auction['count'].'</center></TD><TD><center>'.$cost.'k<br /><small>'.$auction['cost'].'gp</small></center></TD><TD><center>!offer buy, '.$auction['id'].'</center></TR>';
}

$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>ID</center></b></TD><TD class="white"><b><center>#</center></b></TD><TD class="white"><b><center>Item Name</center></b></TD><TD class="white"><b><center>Player</center></b></TD><TD class="white"><b><center>Count</center></b></TD><TD class="white"><b><center>Cost</center></b></td><TD class="white"><b><center>Buy</center></b></td></TR>'.$content.'</TABLE>';
$main_content .= '<br /><p align="right"><small>System created by <a href="http://otland.net/members/vDk/">vDk</a>.</small></p>';
}
?>

i do index.php dodajemy

case "auctionsystem";
$subtopic = "auctionsystem";
$topic = "auctionsystem";
include("auctionsystem.php");
break;

I teraz tylko dodajemy do swojego layoutu i mamy mo?liwo?? aukcji offline.

Pozdrawiam,
Sassin
 
Odp: Aukcje offline

Jak chce to zainstalowac wyskakuje mi taki blad

arse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\auctionsystem.php on line 34


Wiecie co jest nie tak?
 
Odp: Aukcje offline

Ehh... nie ma to jak widzie? sw?j skopiowany skrypt wykonany przez innego autora. Powiem Wam histori? tego skryptu:
Dostaje zlecenie od akade.pl + kleksoria.com, aby go napisa?, tak wi?c napisa?em, przetestowa?em, zap?acili i im da?em. Po kilku dniach ju? inny ots (nie pami?tam nazwy) ju? go mia?, potem kolejne i kolejne, a? teraz go zobaczy?em. Mo?na by powiedzie? - wszystko zacz??o si? od Gelio. Sam nawet nie wiedzia?em, ?e kto? go udost?pni? publicznie, dzi?ki za informacj?. Pewnie teraz na co drugim otsie b?dzie ten system. Nie ma to jak unikalno??...
Pozdrawiam,
Gelio

Ehh drogi Gelio jak ty co? palniesz to mo?na ju? nie wsta? ze ?miechu - zacz??o si? to tak - kto? na otland.net napisa? requesta na ten skrypt podaj?c link do ots.net.pl - postanowi?em napisa? na podstawie tamtego skryptu sw?j w?asny - kt?ry by? PISANY OD ZERA co mo?e Ci potwierdzi? Gesior bo wysy?a?em mu go po kawa?ku podczas tworzenia aby dawa? ewentualne sugestie, nie wnikam czy skrypt pisany przez ciebie wyszed? w sie?, ale dziwi mnie jedno - dlaczego bezpodstawnie przyw?aszczasz sobie prawa do mojego skryptu - kodu twojego nigdy na oczy nie widzia?em, a ty powiniene? rozr??nia? kody swoje, a kody innych.

Dzi?kuje za uwag?.
 
Ostatnia edycja:
Odp: Aukcje offline

wszystko zacz??o si? od Gelio. Sam nawet nie wiedzia?em, ?e kto? go udost?pni? publicznie,

To co zacytowa?em zinterpretowa?em w stylu "kto? udost?pni? ten skrypt a teraz podpisuje si? pod nim" - ot?? mo?e i pomys? by? wasz/kleksa ale wykonanie moje i twoje zdanie powinno wygl?da? inaczej.
 
Ostatnia edycja:
Odp: Aukcje offline

Skrypt oki...xD

Ale mam problem bo pod "#" Nie Wy?wietla mi sie obrazek ;/
 
Odp: Aukcje offline

Je?li mam by? szczery to mnie r?wnie? zirytowa? ten skrypt vdk, zap?aci?em za niego 300z?. Co prawda m?j ma troch? wi?cej funkcji, no ale jednak 300z? drog? nie chodzi, a Gelio te? po?wi?ci? troszk? czasu.

Jednak jest to Tw?j skrypt i oczywi?cie masz prawo to opublikowania go, ja nic do tego nie mam, zirytowa? mnie jedynie fakt, ?e kilka tygodni wcze?niej wybuli?em za niego niez?? kase, a?eby mie? co? unikalnego gdzie nie ma nigdzie indziej. Teraz wszystko jest wsz?dzie, bez sensu.
 
Odp: Aukcje offline

Kleksu, powiedz czemu nie ma obrazk?w??
Fdzie powinien by? folder z obrazkami??

Prosze ;]
 
Odp: Aukcje offline

Je?li mam by? szczery to mnie r?wnie? zirytowa? ten skrypt vdk, zap?aci?em za niego 300z?. Co prawda m?j ma troch? wi?cej funkcji, no ale jednak 300z? drog? nie chodzi, a Gelio te? po?wi?ci? troszk? czasu.
Jednak jest to Tw?j skrypt i oczywi?cie masz prawo to opublikowania go, ja nic do tego nie mam, zirytowa? mnie jedynie fakt, ?e kilka tygodni wcze?niej wybuli?em za niego niez?? kase, a?eby mie? co? unikalnego gdzie nie ma nigdzie indziej. Teraz wszystko jest wsz?dzie, bez sensu.

Widzia?em ten skrypt na 3 otsach + by?o na niego wiele request?w na forach, wiec postanowi?em go stworzy?, nie wiedzia?em ?e jest on a? tak unikalny, wi?c sorry jak komu? przeszkodzi?em :o

@ co do obrazk?w ustaw odpowiedni? ?cie?k? w skrypcie.
Kod:
<img src="http://otland.net/images/items/'.$auction['item_id'].'.gif"/>
 
Odp: Aukcje offline

nic, nie dziala ;/

Zamieniam te z 'OTland.net" na "D:\xampp\htdocs\images\items"
<img src="D:\xampp\htdocs\items'.$auction['item_id'].'.gif"/>

I nic, dalej nie ma ;/
Prosze o pomoc
 
Ostatnia edycja:
Odp: Aukcje offline

@UP
Kod:
<img src="D:\xampp\htdocs\items[B]\[/B]'.$auction['item_id'].'.gif"/>
@Topic
Nie lepiej zrobi?
Kod:
<img scr="./items/'.$auction['item_id'].'.gif" />
?
 
Odp: Aukcje offline

./IMAGES/ITEMS!
Jeju, czy to takie trudne wej?? do htdocs i znale?? milion pi??set obrazk?w i tam da? s?ie?k?? Troche my?lenia, ch?opie.

@vdk-nie ma sprawy, ?ycie to nie bajka ;)
 
Odp: Aukcje offline

Od jakiego? czasu dost?pna jest ju? wersja 1.1b
PHP:
 --[[
        Offline player to player item trader (Auction System) by vDk
                Script version: 1.1b
]]--
local config = {
        levelRequiredToAdd = 20,
        maxOffersPerPlayer = 3,
        SendOffersOnlyInPZ = false,
        blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933}
        }
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                return true
        end
       
        local t = string.explode(param, ",")
        if(t[1] == "add") then
                if((not t[2]) or (not t[3]) or (not t[4])) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                        return true
                end
               
                if(not tonumber(t[3]) or (not tonumber(t[4]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.")
                        return true
                end
               
                if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.")
                        return true
                end
               
                local item = getItemIdByName(t[2], false)
                if(not item) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
                        return true
                end
               
                if(getPlayerLevel(cid) < config.levelRequiredToAdd) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.")
                        return true
                end
                               
                if(isInArray(config.blocked_items, item)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.")
                        return true
                end
               
                if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item.")
                        return true
                end
               
                local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";")
                if(check:getID() == -1) then
                elseif(check:getRows(true) >= config.maxOffersPerPlayer) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")")
                        return true
                end
                               
                if(config.SendOffersOnlyInPZ) then    
                        if(not getTilePzInfo(getPlayerPosition(cid))) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.")
                                return true
                        end
                end
           
                if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.")
                        return true
                end
       

                doPlayerRemoveItem(cid, item, (tonumber(t[4])))
                db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. t[4] .. ", " .. t[3] ..", " .. os.time() .. ")")
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. t[4] .." " .. t[2] .." for " .. t[3] .. " gps to offerts database.")
        end
       
        if(t[1] == "buy") then
                if(not tonumber(t[2])) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                        return true
                end
               
                local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
                if(buy:getID() ~= -1) then
                        if(getPlayerMoney(cid) < buy:getDataInt("cost")) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.")
                                                                buy:free()
                                return true
                        end
                       
                        if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.")
                                                                buy:free()
                                return true
                        end
                       
                        if(isItemStackable((buy:getDataString("item_id")))) then
                                doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))
                        else
                                for i = 1, buy:getDataInt("count") do
                                        doPlayerAddItem(cid, buy:getDataString("item_id"), 1)
                                end
                        end
                       
                        doPlayerRemoveMoney(cid, buy:getDataInt("cost"))
                        db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You buy " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!")
                       
                        local seller = getPlayerByNameWildcard(getPlayerNameByGUID(buy:getDataInt("player")))
                        if(seller) then
                                doPlayerAddMoney(seller, buy:getDataInt("cost"))
                                doPlayerSendTextMessage(seller, MESSAGE_INFO_DESCR, "Someone buy your " .. buy:getDataString("item_name") .. ". You get " .. buy:getDataInt("cost") .. " gps.")
                        else
                                db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";")
                        end
                        buy:free()
                else
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                end
        end
       
        if(t[1] == "remove") then
                if((not tonumber(t[2]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                        return true
                end
               
                local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")        
                if(delete:getID() ~= -1) then
                        if(getPlayerGUID(cid) == delete:getDataInt("player")) then
                                db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
                                if(isItemStackable(delete:getDataString("item_id"))) then
                                        doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
                                else
                                        for i = 1, delete:getDataInt("count") do
                                                doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
                                        end
                                end
                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.")
                        else
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!")
                        end
                                                delete:free()
                else
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                end
        end
        return true
end

a co do sciezki to /images/items wystarczy.
 
Odp: Aukcje offline

#up
To co ja da?em to jest wersja 1.1b...
Moje gg:
Usuni?te
 
Ostatnia edycja:
Status
Zamknięty.
Do góry