Postado Maio 14, 2013 12 anos [14/5/2013 17:45:7] [Error - CreatureScript Interface] [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:onDeath [14/5/2013 17:45:7] Description: [14/5/2013 17:45:7] (LuaInterface::luaGetCreatureName) Creature not found [14/5/2013 17:45:7] [Error - CreatureScript Interface] [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:onDeath [14/5/2013 17:45:7] Description: [14/5/2013 17:45:7] (LuaInterface::luaGetCreatureName) Creature not found [14/5/2013 17:45:7] [Error - CreatureScript Interface] [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:onDeath [14/5/2013 17:45:7] Description: [14/5/2013 17:45:7] (LuaInterface::luaGetCreatureName) Creature not found [14/5/2013 17:45:7] [Error - CreatureScript Interface] [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:onDeath [14/5/2013 17:45:7] Description: [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:32: attempt to call field 'executequery' (a nil value) [14/5/2013 17:45:7] stack traceback: [14/5/2013 17:45:7] data/creaturescripts/scripts/playerdeath.lua:32: in function <data/creaturescripts/scripts/playerdeath.lua:9> [14/5/2013 17:45:7] Omeranty has logged out. [14/5/2013 17:45:11] Omeranty has logged in. Vaga de Scripts, Pro projeto.Contato PM
Postado Maio 15, 2013 12 anos Up Mande o script do arquivo playerdeath.lua... Spoiler local config = { delrey = getPlayerCarValue(cid, DELREY), cigarro = getPlayerCancer(cid, DERBY), prostituta = getPlayerAIDS(cid, cracuda), tresOitao = getPlayerRevorvi(cid, 38) } if(delrey == "Ligado" and cigarro == "Aceso" and prostituta == "No Colo" and tresOitao == "Carregado") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Começou o fim de semana. #PAS") end
Postado Maio 15, 2013 12 anos Autor local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled ~= TRUE) then return end local hitKillerName = "field item" local damageKillerName = "" if(lastHitKiller ~= FALSE) then if(isPlayer(lastHitKiller) == TRUE) then hitKillerName = getPlayerGUID(lastHitKiller) else hitKillerName = getCreatureName(lastHitKiller) end if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then if(isPlayer(mostDamageKiller) == TRUE) then damageKillerName = getPlayerGUID(mostDamageKiller) else damageKillerName = getCreatureName(mostDamageKiller) end end end db.executequery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");") local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";") if(rows:getID() ~= -1) then local amount = rows:getRows(true) - config.maxDeathRecords if(amount > 0) then if(config.sqlType == DATABASE_ENGINE_SQLITE) then for i = 1, amount do db.executequery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);") end else db.executequery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";") end end end end Vaga de Scripts, Pro projeto.Contato PM
Postado Maio 16, 2013 12 anos [paste]frETN4Wv[/paste] -"Supra Omnes Lux Lucis" - Acima de todos brilha a Luz -
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.