Julian09123 Posted February 28, 2013 Share 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? Link to comment
iFoReX Posted February 28, 2013 Share 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 Link to comment
Alexs Posted February 28, 2013 Share 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'. Link to comment
Castillo Posted February 28, 2013 Share Posted February 28, 2013 function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento) end Para que crear esa funcion? Link to comment
iFoReX Posted February 28, 2013 Share Posted February 28, 2013 PD : estaba tan aburrido que te hice una funcion xDD Link to comment
Julian09123 Posted February 28, 2013 Author Share Posted February 28, 2013 Puse lo de Mota pero me aparece la columna pero la locacion donde estoy no Link to comment
Castillo Posted February 28, 2013 Share Posted February 28, 2013 Eso es porque "source" no existe. Link to comment
Julian09123 Posted February 28, 2013 Author Share Posted February 28, 2013 Tambien Me dice esto en Debugscript 3 http://oi49.tinypic.com/2zog8au.jpg Y como creo el source? Link to comment
Castillo Posted February 28, 2013 Share Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer. Link to comment
Julian09123 Posted February 28, 2013 Author Share Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer. osea Donde le agrego el local player? Link to comment
Castillo Posted February 28, 2013 Share Posted February 28, 2013 Proba cambiando "source". Link to comment
Julian09123 Posted February 28, 2013 Author Share Posted February 28, 2013 Proba cambiando "source". Ahora me dice Bad Argument SetElementData [Expected element at argument 1 got nil] Link to comment
Julian09123 Posted February 28, 2013 Author Share Posted February 28, 2013 me ayudan? me dice Bad Argument SetElementData [Expected element at argument 1 got nil] Link to comment
iFoReX Posted February 28, 2013 Share Posted February 28, 2013 Julian postea la linea en donde cambiaste source Link to comment
Julian09123 Posted February 28, 2013 Author Share 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 Link to comment
iFoReX Posted March 1, 2013 Share 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) Link to comment
Julian09123 Posted March 1, 2013 Author Share Posted March 1, 2013 Ahora me Dice esto.. http://oi46.tinypic.com/zu5oqr.jpg Link to comment
Alexs Posted March 1, 2013 Share Posted March 1, 2013 Agrega un 'end' en la linea 15. Link to comment
Julian09123 Posted March 1, 2013 Author Share 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 Link to comment
Castillo Posted March 1, 2013 Share 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 ) Link to comment
Julian09123 Posted March 1, 2013 Author Share Posted March 1, 2013 Funcionando. Gracias a iForex y Castillo Buena ayuda. Y a todos. Link to comment
Recommended Posts