DarkAruna97 Posted August 21, 2014 Share Posted August 21, 2014 Hola, quisiera saber porque no anda el script o como tendria que arreglarlo. local weaponName = getWeaponNameFromID ( weapon ) if weaponName then outputConsoleKillMessage ( "* "..getPlayerName(killer).." killed by "..getPlayerName(source)..". ("..weaponName..")" ) end Quisiera que ese mensaje sea en "RollMessage" Link to comment
Tomas Posted August 22, 2014 Share Posted August 22, 2014 ¿Y qué sería "RollMessage" ? Link to comment
DarkAruna97 Posted August 22, 2014 Author Share Posted August 22, 2014 No te sabria decir si es rollmessage o me estoy confundiendo yo mismo. Pero lo que yo me refiero con rollmesage es cuando un usuario se loguea o muere, sale un mensaje abajo de todo diciendo " Name is logged" y "Name has killed" el script que trato de resolver seria siendo el de "Name has killed by ..Name.. Weapon" Link to comment
Alexs Posted August 22, 2014 Share Posted August 22, 2014 Es difícil que se te ayude con un trozo tan acotado del código. Link to comment
Tomas Posted August 23, 2014 Share Posted August 23, 2014 Te recomiendo este: https://community.multitheftauto.com/index.php?p= ... ls&id=8620 Para el código: function onPlayerWasted(_,killer,weapon) namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) exports.AC_message:outputTopBar(namekiller.." mato a: "..namemuerto.." con "..weaponn",getRootElement(),255,0,0) end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) Link to comment
DarkAruna97 Posted August 30, 2014 Author Share Posted August 30, 2014 Como podria arreglar este script por favor ayudemen ya casi esta listo gracias a Tomas function onPlayerWasted(_,killer,weapon) namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) triggerClientEvent("onRollMessageStart", getRootElement(), (namekiller.." mato a: "..namemuerto.." con " tostring.., 255, 0, 0) end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) Link to comment
Tomas Posted August 30, 2014 Share Posted August 30, 2014 Qué le editaste? El original no era así ._. function onPlayerWasted(_,killer,weapon) if killer and weapon namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) triggerClientEvent("onRollMessageStart", getRootElement(), (namekiller.." mato a: "..namemuerto.." con "..weaponn, 255, 0, 0) end end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) Link to comment
DarkAruna97 Posted August 30, 2014 Author Share Posted August 30, 2014 Qué le editaste? El original no era así ._. function onPlayerWasted(_,killer,weapon) if killer and weapon namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) triggerClientEvent("onRollMessageStart", getRootElement(), (namekiller.." mato a: "..namemuerto.." con "..weaponn, 255, 0, 0) end end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) No se empeze a hacer cosas Link to comment
DarkAruna97 Posted August 31, 2014 Author Share Posted August 31, 2014 Ah ok, pero te funcionó? no Link to comment
Aruna Posted October 3, 2014 Share Posted October 3, 2014 Tomas aca esta el debug solo que me colgue un par de dias me re olvide este post jejej function onPlayerWasted(_,killer,weapon) namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) exports.AC_message:outputTopBar(namekiller.." mato a: "..namemuerto.. " con " ..weaponn, getRootElement(), 255, 0, 0) end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) Link to comment
Tomas Posted October 3, 2014 Share Posted October 3, 2014 El problema se debe a que moriste y no había un 'killer', function onPlayerWasted(_,killer,weapon) if killer then namekiller = getPlayerName(killer) namemuerto = getPlayerName(source) weaponn = tostring(weapon) exports.AC_message:outputTopBar(namekiller.." mato a: "..namemuerto.. " con " ..weaponn, getRootElement(), 255, 0, 0) else exports.AC_message:outputTopBar(namekiller.." murio por causas desconocidas", getRootElement(), 255, 0, 0) end end addEventHandler("onPlayerWasted",getRootElement(),onPlayerWasted) Link to comment
Recommended Posts