margoh
{{ user.title }}
- Joined
- Apr 1, 2013
- Messages
- 806
- Solutions
- 18
- Reaction score
- 350
Hello,
I tried to make chars not able to attack other players with securemode on.
It's working in 90%.
I can't attack anyone without securemode, but when i change securemode to off I am able to attack byt I don't deal any dmg.
I can attack other player only when this other player have securemode off D:
I looked for help on my native language, but there are only spam noobs... and only gushing idiots...
Here are script codes:
Hope someone can help me.
Best regards,
margoh.
I tried to make chars not able to attack other players with securemode on.
It's working in 90%.
I can't attack anyone without securemode, but when i change securemode to off I am able to attack byt I don't deal any dmg.
I can attack other player only when this other player have securemode off D:
I looked for help on my native language, but there are only spam noobs... and only gushing idiots...
Here are script codes:
Lua:
function onCombat(cid,attacker,target)
if(attacker and isPlayer(target) and getPlayerSecureMode(cid) == 0) then
doPlayerSendCancel(cid, "Turn secure mode off if you really want to attack unmarked players.")
return false
end
return true
end
Lua:
function onTarget(cid, target)
if(target and isPlayer(target) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(cid) == 0) then
return false
end
return true
end
function onStatsChange(cid, target, type, combat, value)
if(target and isPlayer(target) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(cid) == 0) then
return false
end
return true
end
function onCast(cid, target)
if(target and isPlayer(target) and (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and getPlayerSecureMode(cid) == 0) then
return false
end
return true
end
Hope someone can help me.
Best regards,
margoh.
Last edited: