Ir para conteúdo

Featured Replies

Postado
  • Autor

'-' Você não explicou nada com isso, como assim " prender o player em determinada posição, sem dizer nada!" ? explica um pouco melhor o que você quer. 

Tipo assim, o comando !kill, e com esse comando ele teleportasse o player pra uma posição, CERTO!    

 

E um comando que retirasse o player dessa posição! entendeu? tipo 1 cadeia, mas quero utiliza-lo para outra coisa 

  • Respostas 7
  • Visualizações 1.3k
  • Created
  • Última resposta

Top Posters In This Topic

Postado

prision.lua

function onSay(cid, words, param, channel)
    local stor = 50505 -- storage
    local prisionpos = {x=123, y=456, z=7} -- pos
    local player = getPlayerByNameWildcard(param)
    if (words == '/imprison') then
        if (param == '') then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Enter the player name you want to imprison.')
        end
        
            if (not tostring(param)) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Invalid param specified.')
            end
            
                if (not player) then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Player '..param..' not found.')
                end
            
            if (getPlayerStorageValue(player, stor) > 0) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'The player '..param..' is already imprisoned.')
            end
            
        if (getPlayerAccess(player) > 3) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You cannot imprison a player with access higher than 3.')
        end
        
        setPlayerStorageValue(player, stor, 1)
        doTeleportThing(player, prisionpos)
        doSendMagicEffect(getThingPos(player), CONST_ME_TELEPORT)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have imprisoned the player '..param)
    elseif (words == '/release') then
        if (param == '') then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Enter the player name you want to imprison.')
        end
        
            if (not tostring(param)) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Invalid param specified.')
            end
            
                if (not player) then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Player '..param..' not found.')
                end
            
            if (getPlayerStorageValue(player, stor) < 1) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'The player '..param..' is not imprisoned.')
            end
            
        setPlayerStorageValue(player, stor, -1)
        doTeleportThing(player, getTownTemplePosition(getPlayerTown(player)))
        doSendMagicEffect(getThingPos(player), CONST_ME_TELEPORT)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, 'You have released the player '..param)
    end
    return true
end



 

<talkaction log="yes" words="/imprison;/release" access="5" event="script" value="prision.lua"/>


Prender:

/imprison Player


Libertar:

/release Player

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

The corrupt fear us.

The honest support us.

The heroic join us.

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.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo