Ir para conteúdo
  • 0

Erro Do Evento


Carnavotu

Pergunta

3 respostass a esta questão

Posts Recomendados

  • 0

Aqui esta:

 

 

dofile("config-dtk.lua")

function onPrepareDeath(cid, deathList)

if getPlayerStorageValue(cid,death_times) == -1 then setPlayerStorageValue(cid,death_times,1) end

addEvent(doTeleportThing,1,cid,tp_pos_init[getPlayerGroup(cid)])

local delay = 0

local times = 5*getPlayerStorageValue(cid,death_times)

doCreatureSetNoMove(cid,TRUE)

setPlayerStorageValue(cid,controle_in_delay,1)

for i=times,0,-1 do

addEvent(doMessageWithCheck,delay,cid,21,"Respawn to back: "..i)

delay = 2000 + delay

if i == 0 then

addEvent(doMovePlayer,delay+1000,cid)

end

end

return TRUE

end

function doMessageWithCheck(cid,type,msg)

if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then

doPlayerSendTextMessage(cid,type,msg)

else

stopEvent(doMessageWithCheck)

end

return TRUE

end

function doMovePlayer(cid)

if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then

doCreatureSetNoMove(cid, FALSE)

doPlayerSendTextMessage(cid, 21, "Go Go GO!")

setPlayerStorageValue(cid,death_times,getPlayerStorageValue(cid,death_times)+1)

setPlayerStorageValue(cid,controle_in_delay,-1)

end

end

 

Link para o comentário
Compartilhar em outros sites

  • 0

aki esta

 

function onPrepareDeath(cid, deathList)
if getPlayerStorageValue(cid,death_times) == -1 then setPlayerStorageValue(cid,death_times,1) end
addEvent(doTeleportThing,1,cid,tp_pos_init[getPlayerGroup(cid)])
local delay = 0
local times = 5*getPlayerStorageValue(cid,death_times)
doCreatureSetNoMove(cid,TRUE)
setPlayerStorageValue(cid,controle_in_delay,1)
for i=times,0,-1 do
addEvent(doMessageWithCheck,delay,cid,21,"Respawn to back: "..i)
delay = 2000 + delay
if i == 0 then
addEvent(doMovePlayer,delay+1000,cid)
end
end
return TRUE
end
function doMessageWithCheck(cid,type,msg)
if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then
doPlayerSendTextMessage(cid,type,msg)
else
stopEvent(doMessageWithCheck)
end
return TRUE
end
function doMovePlayer(cid)
if isPlayerOnline(getCreatureName(cid)) and getGlobalStorageValue(controle_atived) ~= -1 then
doCreatureSetNoMove(cid, FALSE)
doPlayerSendTextMessage(cid, 21, "Go Go GO!")
setPlayerStorageValue(cid,death_times,getPlayerStorageValue(cid,death_times)+1)
setPlayerStorageValue(cid,controle_in_delay,-1)
end
end

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...