Godely
Member
- Joined
- Aug 19, 2007
- Messages
- 233
- Reaction score
- 19
Hello... Today I was implanting a train code (from a guy I forgot the name)... and I did some changes... So, here is my question:
So, the problem is: they are on functions.lua, in separated functions, but I want the "event1" stop in the other function as a "stopEvent". How do I do that?
Thanks, bye.
Code:
function doPlayerEndTraining(cid)
if isPlayerTraining(cid) == TRUE then
doTeleportThing(cid, TRAIN_EXIT_POS, FALSE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
stopEvent(event1)
stopEvent(event2)
end
end
function doPlayerExtendTraining(cid)
event1 = addEvent(setPlayerTrainCode, TRAIN_TIME * 1000 * 10, cid)
event2 = addEvent(isItEndOfTraining, (TRAIN_TIME * 1000 * 10) + 10000, cid)
end
So, the problem is: they are on functions.lua, in separated functions, but I want the "event1" stop in the other function as a "stopEvent". How do I do that?
Thanks, bye.