PashaBiceps Posted March 24, 2019 Share Posted March 24, 2019 Olá gente ! Bom o meu problema é o seguinte, esta parte do meu resource envés de "ativar" para quem dá dano está "ativando" para quem recebe dano. O que posso fazer para que ative para quem dá o dano? Obrigado desde já addEventHandler( "onPlayerDamage", root, function (targetElem) if (bodypart == 3 or 4 or 5 or 6 or 7 or 8 or 9 ) then if (targetElem and targetElem:getType("player") and source:getWeapon() == 23) then if (source:getData("Venda:Police.Job")) then if (targetElem:getWantedLevel() == 0) then return addNotification(source, "Essa pessoa não está com nível de procurado!", "error"); elseif (not Boxs["Markers"]["Create"]["Vehicle"][source]) then return addNotification(source, "Nenhuma viatura encontrada para levar o sujeito!", "error"); end if (targetElem:getHealth() >= 31) then setElementVisibleTo(Boxs["Markers"]["Create"]["Jail"], source, true); targetElem:setAnimation("ped","CAR_dead_LHS"); targetElem:attach(Boxs["Markers"]["Create"]["Vehicle"][source], 0.2, -1.5, 0, 0, 0, 90); addNotification(targetElem, "Tu acabas-te de ser algemado e preso, espera ser encaminhado para a cadeia.", "info"); addNotification(source, "Tu prendes-te uma pessoa! Leva-a até ao departamento (Sirenes Azuis)", "info"); end end end end end ) Link to comment
Other Languages Moderators Lord Henry Posted March 24, 2019 Other Languages Moderators Share Posted March 24, 2019 source é quem recebe o dano. Em vez de usar source, use targetElem no lugar. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now