Ir para conteúdo

Featured Replies

Postado
  • 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 true
end

 

Bom Uso! 

 

Creditos. 

Kaiotp 

Hiromath 

AlexClusive

 

Editado por Kaiotp (veja o histórico de edições)

Melhor Empresa de Hospedagem ; http://www.jvservers.com.br/aff.php?aff=023

  • 2 years later...
Postado
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 true
end

 

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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo