Alonso knight
New Member
- Joined
- Jan 3, 2008
- Messages
- 72
- Reaction score
- 0
I am doing a jail system by Talkactions. It works like this...
For jail someone you must say !jail "name,reason,time, for example !jail "Alonso,botter,10sec.
Well, until here it's all OK, but when the char is sent to the jail, I use an addEvent(onTime) function for get the time the player must be jailed.
When that time has expired, the player should be teleported to the "unjailpos" using this....
It works when the player hasn't logged out while he was jailed, but if the player logout while he is in the jail, he isn't teleported to the "unjailpos" again.
Could someone explain me what should I write for get the player teleported, although he had logged out?
For jail someone you must say !jail "name,reason,time, for example !jail "Alonso,botter,10sec.
Well, until here it's all OK, but when the char is sent to the jail, I use an addEvent(onTime) function for get the time the player must be jailed.
When that time has expired, the player should be teleported to the "unjailpos" using this....
PHP:
function onTime(a)
if isPlayer(a.player) == TRUE then
doTeleportThing(a.player,a.unjailpos,TRUE)
doPlayerSendTextMessage(a.player, MESSAGE_INFO_DESCR, "You are free again!!")
end
end
Could someone explain me what should I write for get the player teleported, although he had logged out?