Pawcio6
Member
- Joined
- Sep 26, 2009
- Messages
- 144
- Solutions
- 4
- Reaction score
- 15
Witam mam problem z tym skryptem(tfs 0.3.6)
skrypt dziala lecz gdy jest wlaczony nie mozna zaznaczyc/atakowac potworka probowalem pozamieniac return true/false ale wtedy skrypt przestawal dzialac(mozna bylo potwory bic)
bledow zadnych w silniku nie ma
PHP:
local stages = {
{ from = 1, to = 49 },
{ from = 50, to = 110 },
{ from = 111, to = 1199990 }
}
function onCombat(cid, target)
local level = getPlayerLevel(cid)
if isPlayer(target) then
local target_level = getPlayerLevel(target)
for i = 1, #stages do
if level >= stages[i].from and level <= stages[i].to then
if target_level >= stages[i].from and target_level <= stages[i].to then
return true
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Nie mozesz atakowac tej postaci.")
end
end
end
end
return false
end
bledow zadnych w silniku nie ma