Pedrook
Advanced OT User
- Joined
- May 24, 2009
- Messages
- 442
- Solutions
- 3
- Reaction score
- 183
- Location
- Brazil
- GitHub
- pedrogiampietro
Hello, good night.
I would like help to adapt this script to tfs 1.2 works the following way, if I'm attacking such a bixo can not push me.
I would like help to adapt this script to tfs 1.2 works the following way, if I'm attacking such a bixo can not push me.
Lua:
local config = {
targetList = {
[1] = 'purching bag'
},
access = 3 -- Gamemaster
}
function onPush(cid, target)
if getPlayerAccess(cid) >= config.access then
return true
end
if target == cid or not isPlayer(target) then
return true
end
if (getCreatureTarget(target) > 0 and isInArray(config.targetList, getCreatureName(getCreatureTarget(target)):lower())) then
doPlayerSendCancel(cid, "You cannot move this player.")
return false
end
return true
end