JPzin Posted March 25, 2024 Share Posted March 25, 2024 Então Queria saber se tem como me ajudar, tipo o player toma um tiro mais na cabeça mais inves de morrer ela toma uma quantidade de dano tipo dei um tiro ela tomou 30 de dano entende Link to comment
WWW Posted March 25, 2024 Share Posted March 25, 2024 addEventHandler("onClientPlayerDamage", root, function(attacker, damage_causing, bodypart, loss) if bodypart == 9 then cancelEvent() setElementHealth(source, getElementHealth(source) - 30) end end Link to comment
JPzin Posted March 25, 2024 Author Share Posted March 25, 2024 cara por algum motivo n foi Link to comment
WWW Posted March 25, 2024 Share Posted March 25, 2024 Crie um recurso com o código abaixo em cliente, desative o recurso headshot também. addEventHandler("onClientPlayerDamage", root, function(attacker, damage_causing, bodypart, loss) if bodypart == 9 then setElementHealth(source, getElementHealth(source) - 30) end end Link to comment
JPzin Posted March 25, 2024 Author Share Posted March 25, 2024 cara eu n sei muito de script sabe, então preciso criar uma função ou um local função ? Link to comment
WWW Posted March 25, 2024 Share Posted March 25, 2024 Cliente: addEventHandler("onClientPlayerDamage", root, function() if bodypart == 9 then setElementHealth(source, getElementHealth(source) - 30) end end Meta: <meta> <script src="client.lua" type="client" /> </meta> Link to comment
Other Languages Moderators Lord Henry Posted March 26, 2024 Other Languages Moderators Share Posted March 26, 2024 Nenhum desses exemplos vai funcionar pois faltou fechar o parênteses do addEventHandler. Adicione um ) depois do último end. 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