3 horas atrás, malyfanek disse:I have a problem with PZ, players can enter PZ with fight on and they get PZ, when they left fight is back ....
I though about making walkon event with pz tile but ... im not sure is it good idea, wouldnt it slow down server very much?
Maybe i got something wrong in source? (where to search for it? i checked tile.h, tile.cpp, players.cpp didnt see anything wrong there i guess)
Making script with pz pushback if in fight condition ?? But also have no idea how it shall look ...
Strange is cuz though that if i add PZ at mapeditor, it shoudlnt let players enter there if in fight etc but it does ....
Tfs 0.4 rev 3777 client 8.6
Tried:
function onThink (interval)
if isPlayer (cid) and (getTilePzInfo (getCreaturePosition (cid)) and
getCreatureCondition (cid, CONDITION_INFIGHT)) then
doTeleportThing (cid, fromPosition, false)
doPlayerSendTextMessage (cid, 25, "while you can't enter . ")
end
return true
end
No errors at console, tried with true / false but not works; x
Are you sure it isn't giving any error in console? I think there is some things missing in this code, shouldn't it be like onThink(cid, interval) instead of onThink(interval)? Also the variable fromPosition in function doTeleportThing is not declareted so it doesn't have a value. I think it's way easier to make this script using onMove instead of onThink xD
edit: I think there is something wrong with your distro, you shouldn't need a lua script for this system, try using TFS 0.4 Rev3996, you can find it here:




info
Grupo: Campones
Registrado: 29/10/19
Posts: 6
Reputação: 0
I have a problem with PZ, players can enter PZ with fight on and they get PZ, when they left fight is back ....
I though about making walkon event with pz tile but ... im not sure is it good idea, wouldnt it slow down server very much?
Maybe i got something wrong in source? (where to search for it? i checked tile.h, tile.cpp, players.cpp didnt see anything wrong there i guess)
Making script with pz pushback if in fight condition ?? But also have no idea how it shall look ...
Strange is cuz though that if i add PZ at mapeditor, it shoudlnt let players enter there if in fight etc but it does ....
Tfs 0.4 rev 3777 client 8.6
Tried:
function onThink (interval)
if isPlayer (cid) and (getTilePzInfo (getCreaturePosition (cid)) and
getCreatureCondition (cid, CONDITION_INFIGHT)) then
doTeleportThing (cid, fromPosition, false)
doPlayerSendTextMessage (cid, 25, "while you can't enter . ")
end
return true
end
No errors at console, tried with true / false but not works; x
Editado Janeiro 13 por malyfanek