[Duvida] No Script Arma No Sv De Gta
Quando Eu Mato o bixo atirano com armar nao ganha level me ajude
Me Ajuda Valeno 2 rep um cada dia por favor me ajudeeeeeeeeeeeee
ESse Script e nas Spells
<rune name="AK-47" id="2394" allowfaruse="1" charges="no" lvl="8" exhaustion="500" maglv="0" range="5" needtarget="0" blocktype="solid" event="script" value="ak47.lua"/>
Script \/
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MORTAREA)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_BOLT)
local attackmin, attackmax = 300, 340 -- attack minimo, attack maximo
function onCastSpell(cid, var)
if doPlayerRemoveItem(cid, 2543, 1) then -- troque pelo id da bolt
target = getCreatureTarget(cid)
if (target <= 0) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Selecione um target.")
return false
end
hit = (math.random(attackmin,attackmax) + getPlayerSkillLevel(cid, SKILL_DISTANCE) / 3)
doCreatureAddHealth(target, -hit)
doSendAnimatedText(getCreaturePosition(target), math.floor(hit), 144)
return doCombat(cid, combat, var)
end
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não possui balas.")
return false
end