gritness
Member
- Joined
- May 26, 2021
- Messages
- 33
- Reaction score
- 6
Hey guys,
Anyone have solution for aoe spells on tfs 1.3 ?
I can't attack another players from weapons when secure mode is on, but when somebody use aoe spells (in secure mode) ... PK turns automatically.
it's possible to set up secure mode with aoe spells ?
Little part of code (creature.lua) :
Without 'if syntax' player cant attack another player (with spells too), but still not working with my 'if'
-Attemp to call a nil value (method 'hasSecureMode')
In another funcion this 'if' working perfectly :
Any idea's how to assign' if player:hasSecureMode()== true then' to function Creature ?
Anyone have solution for aoe spells on tfs 1.3 ?
I can't attack another players from weapons when secure mode is on, but when somebody use aoe spells (in secure mode) ... PK turns automatically.
it's possible to set up secure mode with aoe spells ?
Little part of code (creature.lua) :
Lua:
function CreaturenTargetCombat(player,target)
if player:hasSecureMode()== true then
if self:isPlayer() and target:isPlayer() then
return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER
end
end
return true
end
Without 'if syntax' player cant attack another player (with spells too), but still not working with my 'if'
-Attemp to call a nil value (method 'hasSecureMode')
In another funcion this 'if' working perfectly :
Lua:
function onSay(player, words)
if player:hasSecureMode()==true then
player:sendTextMessage(MESSAGE_INFO_DESCR,"Secure mode on")
elseif player:hasSecureMode()==false then
player:sendTextMessage(MESSAGE_INFO_DESCR,"Secure mode off")
end
end
Any idea's how to assign' if player:hasSecureMode()== true then' to function Creature ?
Last edited by a moderator: