DuFraN Posted April 22, 2013 Posted April 22, 2013 function blow() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!",getRootElement(), 0, 100, 255, true) end end end addEventHandler ( "onClientPlayerWasted",getRootElement(), blow) El script me funciona bien, pero el outputChatBox no me sale coloreado, por que?
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 pon asi: function blow() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!",getRootElement(), 255, 255, 255, true) end end end addEventHandler ( "onClientPlayerWasted",getRootElement(), blow) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 Pues probe tu script y no me funciona...El problema es que ni siquiera me aparece el texto... DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
DuFraN Posted April 22, 2013 Author Posted April 22, 2013 Funciona cuando tocas el agua, sale el texto y todo pero coloreado no
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 Lol disculpa..estoy medio dormido ...asi seria el codigo..te deberia andar perfectoo... function blow() for _, vehicle in ipairs ( getElementsByType ( "vehicle" ) ) do if isElementInWater ( vehicle ) then blowVehicle ( vehicle, true ) outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!", 255, 255, 255, true) end end end addEventHandler ( "onClientPlayerWasted",getRootElement(), blow) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 Igualmente solo te apareceria a vos ese mensaje...Si quieres que le aparezca a todos usa un triggerServerEvent.. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Sasu Posted April 22, 2013 Posted April 22, 2013 Remplaza el outputchatbox asi: outputChatBox(getPlayerName(source).." #0099FFToco el agua y exploto!", 255, 255, 255, false) State: Inactive
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 lol @Sasuke... de que serviria eso...Ni siquiera saldra Rojo...El que yo le pase ya esta bien ._. solo debe cambiar el Hex a el color que quiera o ponerlo a false y editar el r,g,b DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Plate Posted April 22, 2013 Posted April 22, 2013 lol @Sasuke... de que serviria eso...Ni siquiera saldra Rojo...El que yo le pase ya esta bien ._. solo debe cambiar el Hex a el color que quiera o ponerlo a false y editar el r,g,b No salio por que simplemente ponias un getRootElement() y listo Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
MTA Team 0xCiBeR Posted April 22, 2013 MTA Team Posted April 22, 2013 lol men...pero ya le pase el script que anda.... ._. ademas solo te saldria a uno mismo eso... ._. es lo que le dije DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
FraN-724 Posted April 22, 2013 Posted April 22, 2013 Intenta así server side mensajesDead = {'Toco el agua y exploto'} function playerDied(totalAmmo, killer, killerWeapon, bodypart) outputChatBox(getPlayerName(source).." #00aaff" ..mensajesDead[math.random(1,#mensajesDead)]..'.',getRootElement(),255,255,255,true) end addEventHandler("onPlayerWasted",getRootElement(),playerDied)
Alexs Posted April 22, 2013 Posted April 22, 2013 Intenta asíserver side mensajesDead = {'Toco el agua y exploto'} function playerDied(totalAmmo, killer, killerWeapon, bodypart) outputChatBox(getPlayerName(source).." #00aaff" ..mensajesDead[math.random(1,#mensajesDead)]..'.',getRootElement(),255,255,255,true) end addEventHandler("onPlayerWasted",getRootElement(),playerDied) Te falta lo del explotar vehículos y para que concaneas un string al azar de una tabla con un solo string? mejor lo colocas directo. Developer @ MYVAL
FraN-724 Posted April 22, 2013 Posted April 22, 2013 Es lo mismo, ya que él solo ocupará el script para gamemode race, y le puse tabla por si quería agregar más mensajes como el server de XPG.
Renkon Posted April 23, 2013 Posted April 23, 2013 Es que el getRootElement no se utiliza client-side.
Plate Posted April 23, 2013 Posted April 23, 2013 Es que el getRootElement no se utiliza client-side. Gracias no sabia eso Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts