Postado Abril 30, 2013 12 anos Este é um post popular. Uma talkaction que vai incrementar um pouco mais seu servidor. !staff se estiver on parecera o seu nome e se não tiver aparecera um pequeno trecho Em data/talkactions/talkactions.xml: <talkaction words="!staff" event="script" value="staff.lua"/> Agora em data/talkactions/scripts: crie um arquivo chamado staff.lua e cole dentro: function onSay(cid, words, param, channel) local Info = db.getResult("SELECT * FROM `players` WHERE `online` = '1' AND `group_id` > 1") local PlayerString = "Online Staff Members:\n" if Info:getID() ~= -1 then local count, i = Info:getRows(false), 0 repeat PlayerString = PlayerString .. Info:getDataString("name") .. " - " if Info:getDataInt("group_id") == 2 then PlayerString = PlayerString .. "Tutor" elseif Info:getDataInt("group_id") == 3 then PlayerString = PlayerString .. "Senior Tutor" elseif Info:getDataInt("group_id") == 4 then PlayerString = PlayerString .. "Game Master" elseif Info:getDataInt("group_id") == 5 then PlayerString = PlayerString .. "Community Manager" elseif Info:getDataInt("group_id") == 6 then PlayerString = PlayerString .. "God" end PlayerString = PlayerString .. "\n" until not(Info:next()) Info:free() else PlayerString = PlayerString .. "No staff online, try again later" end doPlayerPopupFYI(cid, PlayerString); return trueend Bom Uso! Creditos. Kaiotp Hiromath AlexClusive Editado Abril 30, 2013 12 anos por Kaiotp (veja o histórico de edições) Melhor Empresa de Hospedagem ; http://www.jvservers.com.br/aff.php?aff=023
Postado Dezembro 16, 2015 9 anos Em 29/04/2013 21:34:25, Kaiotp disse: Uma talkaction que vai incrementar um pouco mais seu servidor. !staff se estiver on parecera o seu nome e se não tiver aparecera um pequeno trecho Em data/talkactions/talkactions.xml: <talkaction words="!staff" event="script" value="staff.lua"/> Agora em data/talkactions/scripts: crie um arquivo chamado staff.lua e cole dentro: function onSay(cid, words, param, channel) local Info = db.getResult("SELECT * FROM `players` WHERE `online` = '1' AND `group_id` > 1") local PlayerString = "Online Staff Members:\n" if Info:getID() ~= -1 then local count, i = Info:getRows(false), 0 repeat PlayerString = PlayerString .. Info:getDataString("name") .. " - " if Info:getDataInt("group_id") == 2 then PlayerString = PlayerString .. "Tutor" elseif Info:getDataInt("group_id") == 3 then PlayerString = PlayerString .. "Senior Tutor" elseif Info:getDataInt("group_id") == 4 then PlayerString = PlayerString .. "Game Master" elseif Info:getDataInt("group_id") == 5 then PlayerString = PlayerString .. "Community Manager" elseif Info:getDataInt("group_id") == 6 then PlayerString = PlayerString .. "God" end PlayerString = PlayerString .. "\n" until not(Info:next()) Info:free() else PlayerString = PlayerString .. "No staff online, try again later" end doPlayerPopupFYI(cid, PlayerString); return trueend Bom Uso! Creditos. Kaiotp Hiromath AlexClusive
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.