magnoOliver

Untitled

Jan 6th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. function morir ( ammo, killer, weapon, bodypart )
  2. if ( killer ) and ( killer ~= source ) then
  3. -- jugador quien mato.
  4. local exp_reciente = getElementData(killer, "marktrab1")+exp_kill
  5.  
  6. if exp_reciente >= exp_nivel then
  7. if getElementData(killer, "nivel") < nivel_maximo then
  8. setElementData(killer, "nivel", getElementData(killer, "nivel")+1)
  9. setElementData(killer, "marktrab1", exp_reciente-exp_nivel)
  10. outputChatBox("[Sistema de Niveles]: ¡Has subido de nivel! Ahora tu nivel es:#FF0000 "..getElementData(killer, "nivel")..".", killer, 0, 255, 0, true)
  11. end
  12. else
  13. setElementData(killer, "marktrab1", exp_reciente)
  14. outputChatBox("[Sistema de Niveles]: Has ganado "..exp_kill.." marktrab1. Tienes un total de:#FF0000 "..exp_reciente.." experiencia.", killer, 0, 255, 0, true)
  15. end
  16. end
  17. end
  18. addEventHandler ( "onPlayerWasted", getRootElement(), morir )
Advertisement
Add Comment
Please, Sign In to add comment