Ir para conteúdo

x1zy

Membro
  • Registro em

  • Última visita

Solutions

  1. x1zy's post in (Resolvido)Função onTime Globalevents 0.4 was marked as the answer   
    <globalevent name="EVENTNAME" time="16:20:00" script="SCRIPTNAME.lua" /> local cfg = { storage = 82342, createpos = {x = 174, y = 47, z = 7}, topos = {x = 70, y = 341, z = 6}, msg = "O Last man standing Event Teleport acabou de fechar! Ele irá reaparecer de novo a cada 2 horas! Todos os participantes, preparem-se para a batalha!", timetoclose = 120 } local function remove() local tp = getTileItemById(cfg.createpos, 1387).uid if tp ~= 0 then doRemoveItem(tp) doBroadcastMessage(cfg.msg) setGlobalStorageValue(cfg.storage, 0) end end function onTime(interval) if not getGlobalStorageValue(cfg.storage) == 1 then setGlobalStorageValue(cfg.storage, 1) doCreateTeleport(1387, cfg.topos, cfg.createpos) doBroadcastMessage("Last man standing event Teleport esta aberto!\nCatch o teleport vai fechar dentro de "..cfg.timetoclose.." segundos! O teleport esta localizado na sala de Eventos.") addEvent(remove, cfg.timetoclose * 1000) end return true end  
     
     
     
  2. x1zy's post in (Resolvido)Action com erro, e pedido talk was marked as the answer   
    local cfg = {item = 2423, ammount = 1} function onUse(cid, item, fromPosition, item2, toPosisition) local rskulls = {green = SKULL_GREEN, red = SKULL_RED, black = SKULL_BLACK} if not isInArray(rskulls, getPlayerSkullType(cid)) then doPlayerSendCancel(cid,"You dont have skulls") return true end if not doPlayerRemoveItem(cid, cfg.item, cfg.ammount) then doPlayerSendCancel(cid,"You need ".. cfg.ammount .. "x " .. getItemNameById(cfg.item) .. ".") return true end doCreatureSetSkullType(cid, 0) doCreatureSay(cid, "Your frags and skulls is cleaned!", 19) player = getPlayerGUID(cid) doRemoveCreature(cid, true) db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. player .. ")") return true end  
  3. x1zy's post in (Resolvido)Alguem me ajuda nessa action was marked as the answer   
    Bem, vou te ajudar a pescar, saca?


    antes de:
     
     setPlayerStorageValue(cid, 18392, getCreatureSpeed(cid))  
    por:
     
    local chance = math.random(1, 6) -- chance 1 em 6 if not chance == 1 then doPlayerSendCancel(cid, "Não foi possivel roubar o carro.") return true end  
    2º  no globalEvents, descobre qual o ficheiro lua do seu logout, e coloca isso:
     
    if getPlayerStorageValue(cid, 18391) == 1 then     doPlayerSendCancel(cid, "Você está num veículo.")     return false  end 3° basta adicionar actionID nos tiles na frente do "depot" e configurar um onMoviment e checar a storage,
    se sim chama o codigo que remove o outfit/speed de carro.

    4º mais uma vez, não tem no codigo a parte que ele desce do carro.

Informação Importante

Confirmação de Termo