Postado Julho 21, 2021 3 anos 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
Postado Julho 22, 2021 3 anos 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 Precisando de ajuda? Discord: 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.