Jump to content

Ayuda con sistema de niveles


wambosf

Recommended Posts

Posted

Hola a todos, soy bastante nuevo en este tema de los foros y el scripting. Estoy tratando de hacer un sistema de niveles pero tengo una duda sobre como hacer de que eljugador gane experiencia matando a otros. Me guié por un sistema de niveles basado en zombies. Y era esto:

    addEvent ( "onZombieWasted", true )
    addEventHandler ( "onZombieWasted", root,
        function ( theKiller )
            exports.exp_system:addPlayerEXP ( theKiller, 10)
        end
    )

Y lo cambié a esto 

    addEvent ( "onPlayerWasted", true )
    addEventHandler ( "onPlayerWasted", root,
        function ( theKiller )
            exports.exp_system:addPlayerEXP ( theKiller, 10)
        end
    )

Pero no me añade experiencia, alguien me podría ayudar? PD: Vuelvo a repetir, soy muy novato en esto jajaja :(

Posted
    addEvent ( "onPlayerWasted", true )
    addEventHandler ( "onPlayerWasted", root,
        function (_, theKiller )
    	   	if theKiller and not theKiller == source then
           	   	exports.exp_system:addPlayerEXP ( theKiller, 10)
      	   	end
        end
    )

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...