Julian09123 Posted February 28, 2013 Posted February 28, 2013 Hola Amigos, Bueno Yo quisiera Crear en el tab Una Columna que Diga Lugar y abajo LS O LF O SF me podrian guiar a como ahcerla?
iFoReX Posted February 28, 2013 Posted February 28, 2013 (edited) exports.scoreboard:scoreboardAddColumn("lugar") function julianEsGay() local x,y,z = getElementPosition(source) local lugar = getZoneName(x,y,z) resetearColumna(source,"lugar",lugar) end setTimer(function() julianEsGay() end,1000,0) function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento) end proba asi la hice a la rapida postea si hay algun error PD : estaba tan aburrido que te hice una funcion xDD Edited February 28, 2013 by Guest
Alexs Posted February 28, 2013 Posted February 28, 2013 Usa: getZoneName su cuarto argumento es un boolean que dice la ciudad, Para agregarlo a la scoreboard, utiliza la función exportada: 'scoreboardAddColumn'.
Castillo Posted February 28, 2013 Posted February 28, 2013 function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento) end Para que crear esa funcion?
iFoReX Posted February 28, 2013 Posted February 28, 2013 PD : estaba tan aburrido que te hice una funcion xDD
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 Puse lo de Mota pero me aparece la columna pero la locacion donde estoy no
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 Tambien Me dice esto en Debugscript 3 http://oi49.tinypic.com/2zog8au.jpg Y como creo el source?
Castillo Posted February 28, 2013 Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer.
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer. osea Donde le agrego el local player?
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 Proba cambiando "source". Ahora me dice Bad Argument SetElementData [Expected element at argument 1 got nil]
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 me ayudan? me dice Bad Argument SetElementData [Expected element at argument 1 got nil]
iFoReX Posted February 28, 2013 Posted February 28, 2013 Julian postea la linea en donde cambiaste source
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 exports.scoreboard:scoreboardAddColumn("lugar") function Lugar() local x,y,z = getElementPosition(localplayer) local lugar = getZoneName(x,y,z) resetearColumna(source,"lugar",lugar) end setTimer(function() Lugar() end,1000,0) function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento) end
iFoReX Posted March 1, 2013 Posted March 1, 2013 Proba asi sv-side exports.scoreboard:scoreboardAddColumn("lugar") cl-side function Lugar() local x,y,z = getElementPosition(getLocalPlayer()) local lugar = getZoneName(x,y,z) resetearColumna(getLocalPlayer(),"lugar",lugar) end setTimer(function() Lugar() end,1000,0) function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento,true)
Julian09123 Posted March 1, 2013 Author Posted March 1, 2013 Ahora me Dice esto.. http://oi46.tinypic.com/zu5oqr.jpg
Julian09123 Posted March 1, 2013 Author Posted March 1, 2013 ahora si Pero Me queda Gigante porq los nombres son muy grandes entonces Yo quiero Poner donde esta osea LS SF O Lv las aventuras san fierro y los santos
Castillo Posted March 1, 2013 Posted March 1, 2013 local cityTags = { [ "Los Santos" ] = "LS", [ "Las Venturas" ] = "LV", [ "San Fierro" ] = "SF" } function updateLocation ( ) local x, y, z = getElementPosition ( localPlayer ) local city = getZoneName ( x, y, z, true ) setElementData ( localPlayer, "lugar", cityTags [ city ] or "N/A" ) end setTimer ( updateLocation, 1000, 0 )
Julian09123 Posted March 1, 2013 Author Posted March 1, 2013 Funcionando. Gracias a iForex y Castillo Buena ayuda. Y a todos.
Recommended Posts