Ir para conteúdo

Featured Replies

Postado
  • Autor
Em 19/07/2021 em 21:29, Yan Liima disse:

local config = {
toKnow = 456789,
storage = 789456,
pos = {x = 402, y = 907, z = 7}, -- para onde o jogador será teleportado caso o tempo tenha acabado.
}

local function kickP(cid)
		if(isPlayer(cid)) then
			doRemoveCreature(cid)
		end
end

function onKill(cid, target, lastHit)
    if getPlayerStorageValue (cid, config.toKnow) == 1 then
        if getPlayerStorageValue (cid, config.storage) < os.time () then
            doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
            doRemoveCreature (cid)
        end
    end
return true
end

function onThink(cid, interval)
if getPlayerStorageValue (cid, config.toKnow) == 1 and getPlayerStorageValue (cid, config.storage)  < os.time () then
addEvent(kickP, 3000, cid) -- 3000 = 3 segundos.
end
return true
end

function onLogin(cid)
    if getPlayerStorageValue (cid, config.toKnow) == 1 then
        if getPlayerStorageValue (cid, config.storage)  < os.time () then
            doTeleportThing (cid, config.pos)
            setPlayerStorageValue (cid, config.toKnow, 0)
        end
    end
return true
end

 

nova tag XML


<event type="think" name="Kickp" event="script" value="NOME_DO_SCRIPT.lua"/>

 

O mano, n querendo abusar muito.
Mas sera que da pra voce adicionar esse aqui tbm ?
pra quando acabar ser kikado.

 

Citar

--[[ by vodkart ]]--
function onLogin(cid)

if getPlayerStorageValue(cid, 13714) - os.time() > 0 then
setPlayerStorageValue(cid, 9898, 1)
elseif getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13714) - os.time() <= 0 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid, "Sua Vip")
setPlayerStorageValue(cid, 9898, -1)
end
return TRUE
end

 

  • Respostas 6
  • Visualizações 700
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local config = { toKnow = 456789, storage = 789456, pos = {x = 402, y = 907, z = 7}, -- para onde o jogador será teleportado caso o tempo tenha acabado. } local function kickP(cid) if(isPlayer(cid)

Postado
10 horas atrás, Doidodepeda disse:

O mano, n querendo abusar muito.
Mas sera que da pra voce adicionar esse aqui tbm ?
pra quando acabar ser kikado.

 

 

 

É só pegar a função que eu fiz, copiar e editar...

Spoiler

--[[ by vodkart ]]--
function onLogin(cid)

if getPlayerStorageValue(cid, 13714) - os.time() > 0 then
setPlayerStorageValue(cid, 9898, 1)
elseif getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13714) - os.time() <= 0 then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerPopupFYI(cid, "Sua Vip")
setPlayerStorageValue(cid, 9898, -1)
end
return TRUE
end

local function kickP(cid)
		if(isPlayer(cid)) then
			doRemoveCreature(cid)
		end
end

function onThink(cid, interval)
if getPlayerStorageValue(cid, 9898) == 1 and getPlayerStorageValue(cid, 13714)  - os.time() <= 0 then
addEvent(kickP, 3000, cid)
end
return true
end

 

<event type="think" name="Kickp2" event="script" value="NOME_DO_SCRIPT.lua"/>

 

════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═══╗

Te Ajudei? Rep + e ficamos Quits

166420979_logoyanliimaornight.png.33f822b8970081a5b3646e85dbfd5934.png

Precisando de ajuda?

discord.png.1ecd188791d0141f74d99db371a2e0a4.png.890d5a38d7bcde75543c72b624a65de1.pngDiscord: Yan Liima #3702

Programador Júnior de LUA, PHP e JavaScript

Juntos somos lendas, separados somos Mitos!

╚══════════════════════════ҳ̸Ҳ̸ҳஜ۩۞۩ஜҳ̸Ҳ̸ҳ═════════════════════════════╝

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