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? Skype: Juliang09123
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 elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
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'. Developer @ MYVAL
Castillo Posted February 28, 2013 Posted February 28, 2013 function resetearColumna(jugador,columna,elemento) setElementData(jugador,columna,elemento) end Para que crear esa funcion? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
iFoReX Posted February 28, 2013 Posted February 28, 2013 PD : estaba tan aburrido que te hice una funcion xDD elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
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 Skype: Juliang09123
Castillo Posted February 28, 2013 Posted February 28, 2013 Eso es porque "source" no existe. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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? Skype: Juliang09123
Castillo Posted February 28, 2013 Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 Podrias crearlo client side, y usar localPlayer. osea Donde le agrego el local player? Skype: Juliang09123
Castillo Posted February 28, 2013 Posted February 28, 2013 Proba cambiando "source". San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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] Skype: Juliang09123
Julian09123 Posted February 28, 2013 Author Posted February 28, 2013 me ayudan? me dice Bad Argument SetElementData [Expected element at argument 1 got nil] Skype: Juliang09123
iFoReX Posted February 28, 2013 Posted February 28, 2013 Julian postea la linea en donde cambiaste source elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
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 Skype: Juliang09123
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) elMota/elFoReX De Vuelta En MTA *---------* Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3 https://www.youtube.com/user/KillersGPs
Julian09123 Posted March 1, 2013 Author Posted March 1, 2013 Ahora me Dice esto.. http://oi46.tinypic.com/zu5oqr.jpg Skype: Juliang09123
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 Skype: Juliang09123
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 ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Julian09123 Posted March 1, 2013 Author Posted March 1, 2013 Funcionando. Gracias a iForex y Castillo Buena ayuda. Y a todos. Skype: Juliang09123
Castillo Posted March 1, 2013 Posted March 1, 2013 De nada. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts