HI, Have this script here but its not working exactly as I want it to
I want the script to run(doCombat) as long as the player has target every 500ms but it happens only once
TFS 1.0
If you can help me that would be great
edit/fixed
I want the script to run(doCombat) as long as the player has target every 500ms but it happens only once
Lua:
local timeX = 500
local y = 1
for i = 1, y do
addEvent(function()
local target = Player(cid):getTarget()
if target then
doCombat(cid, combat, var)
y = y + 1
timeX = timeX + 500
end
end, timeX)
end
TFS 1.0
If you can help me that would be great
edit/fixed
Lua:
function repeatX()
local target = Player(cid):getTarget()
if target then
doCombat(cid, combat, var)
addEvent(repeatX, 500)
end
end
Last edited: