i use thats function make by me in one spell
but when i use the spell the serve's down
thas function check the distance of user and compare with the target sword
its work perfect in (function oncastSpell(cid, var))
but i prefer to check in parameters
plx help
rep++
but when i use the spell the serve's down
PHP:
function onCastSpell3(parameters)
if (math.random(0, 100) <= (50 + (getPlayerSkill(parameters.cid, SKILL_DISTANCE)-getPlayerSkill(getCreatureTarget(parameters.cid), SKILL_SWORD)))) then
doCombat(parameters.cid, combat3, parameters.var)
doPlayerAddSkillTry(parameters.cid, SKILL_DISTANCE, 1)
doPlayerRemoveItem(parameters.cid, 7368, 1)
else
doSendAnimatedText(getPlayerPosition(parameters.cid), "MISS", TEXTCOLOR_WHITE)
doSendDistanceShoot(getCreaturePosition(parameters.cid), getCreaturePosition(getCreatureTarget(parameters.cid)), CONST_ANI_GREENSTAR)
doSendMagicEffect(getCreaturePosition(getCreatureTarget(parameters.cid)), CONST_ME_POFF)
doPlayerRemoveItem(parameters.cid, 7368, 1)
end
end
thas function check the distance of user and compare with the target sword
its work perfect in (function oncastSpell(cid, var))
but i prefer to check in parameters
plx help
rep++