Ratasauria Posted August 11, 2021 Share Posted August 11, 2021 Hola estoy en busqueda de algun script qe al morir en el juego se te salga automaticamente alguien me lo pasa porfa? gracias Link to comment
CastiaL Posted August 11, 2021 Share Posted August 11, 2021 (edited) https://community.multitheftauto.com/index.php?p=resources&s=details&id=9592 Se puede utilizar el script que se encuentra en el enlace anterior. Fallecido escrito a la derecha. Bienvenido al club :) Edited August 11, 2021 by CastiaL Link to comment
Ratasauria Posted August 11, 2021 Author Share Posted August 11, 2021 si gracias , pero estaba buscando PARA QUE SE LE SALGA EL JUEGO CUANDO MUERE nose el script amigo o que se utilizaria onplayerdead() quit ¿? end necesito el codigo amigo :' if ( killer and isElement(killer) and getElementType ( killer ) == "player" ) then exittt este codigo necesito :v 7 hours ago, CastiaL said: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9592 Se puede utilizar el script que se encuentra en el enlace anterior. Fallecido escrito a la derecha. Bienvenido al club :) UNA CONSULTA BRO estos codigo son como nodejs no ? yo algo entiendo de nodejs Link to comment
CastiaL Posted August 12, 2021 Share Posted August 12, 2021 (edited) Los códigos Lua están cerca de nodejs -- 1. Example addEventHandler( "onPlayerWasted", root, function() player = source -- player playerName = getPlayerName(player) -- player Name outputChatBox(playerName.." ha muerto!", resourceRoot, 255, 0, 0, true) -- 255, 0 , 0 = rojo, verde, azul end ) -- 2. Example function player_Wasted ( ammo, attacker, weapon, bodypart ) -- if there was an attacker if ( attacker ) then -- we declare our variable outside the following checks local tempString -- if the element that killed him was a player, if ( getElementType ( attacker ) == "player" ) then -- put the attacker, victim and weapon info in the string tempString = getPlayerName ( attacker ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" -- else, if it was a vehicle, elseif ( getElementType ( attacker ) == "vehicle" ) then -- we'll get the name from the attacker vehicle's driver tempString = getPlayerName ( getVehicleController ( attacker ) ).." killed "..getPlayerName ( source ).." ("..getWeaponNameFromID ( weapon )..")" end -- if the victim was shot in the head, append a special message if ( bodypart == 9 ) then tempString = tempString.." (HEADSHOT!)" -- else, just append the bodypart name else tempString = tempString.." ("..getBodyPartName ( bodypart )..")" end -- display the message outputChatBox ( tempString ) -- if there was no attacker, else -- output a death message without attacker info outputChatBox ( getPlayerName ( source ).." died. ("..getWeaponNameFromID ( weapon )..") ("..getBodyPartName ( bodypart )..")" ) end end addEventHandler ( "onPlayerWasted", root, player_Wasted ) Si escribe qué hacer cuando el jugador muere, puedo ayudar. Desde la derecha, estaría muy feliz si le agrado. Edited August 12, 2021 by CastiaL 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