Ola a todos venho aqui hoje para postar meu primero script, sua finalidade é mostrar os equipamentos que seus jogadores estao usando
Primeiramente adicione essa tag em data/talkactions/talkactions.xml
<talkaction log="yes" access="5" words="/slots" event="script" value="slots.lua"/>
Logo depois crie um arquivo chamado slots.lua em talkactions/scripts
--[[ By: TopMaster First Script ]]-- function onSay(cid, words, param, channel) if not param or param == "" or not getPlayerByName(param) then return doPlayerSendTextMessage(cid, 27, "Player Not Found.") end local p = getPlayerByName(param) local sloname = {"Head", "Necklace", "Backpack", "Armor", "Right", "Left", "Legs", "Feet", "Ring", "Ammo"} tx = "" for i = 1, 10 do s = getPlayerSlotItem(p, i).itemid if s ~= 0 then tx = tx .. "[" .. string.upper(sloname[i]) .. "] = " .. string.upper(getItemNameById(getPlayerSlotItem(p, i).itemid)) .. "\n" else tx = tx .. "[" .. string.upper(sloname[i]) .. "] = EMPTY\n" end end tx = "[" .. getCreatureName(p) .. "]\n\n" .. tx doPlayerPopupFYI(cid, tx) return true end
Imagem
Modo de usar
Apenas use o comando /slots nome do jogador por exemplo, /slots Dante.
Bom é isso espero que gostem e comentem vlw.