lucascba Posted May 1, 2015 Posted May 1, 2015 Hola, me gustaria saber como puedo hacer que un objeto sea visible solo para una persona y luego para todos?
lucascba Posted May 1, 2015 Author Posted May 1, 2015 setElementVisibleTo This does not work with all entities - vehicles, players and objects are exempt.
Enargy, Posted May 1, 2015 Posted May 1, 2015 setElementVisibleTo This does not work with all entities - vehicles, players and objects are exempt. ??
lucascba Posted May 1, 2015 Author Posted May 1, 2015 Dice que esa funcion no se puede utilizar en objetos
Tomas Posted May 1, 2015 Posted May 1, 2015 Realmente eso quiere decir 'Esto no funciona con todas las entidades - vehículos, jugadores y objetos están exentos."
lucascba Posted May 1, 2015 Author Posted May 1, 2015 Si ya sabia, era una manera de abreviar y no decirlo todo eran las 4am .-. jaja, Alguna otra sugerencia para hacer eso?
Enargy, Posted May 1, 2015 Posted May 1, 2015 Intenta con esto. no lo he probado addCommandHandler("visible", function(thePlayer) if not objeto then local my_position = {getElementPosition( thePlayer )}; objeto = createObject(700, unpack(my_position)); setElementCollisionsEnabled(objeto,false); setElementAlpha(objeto,0); outputChatBox("El objeto no habia sido creado anteriormente. Ahora se creó exitosamente!", thePlayer); else for _, player in ipairs(getElementsByType("player")) do if ( player == thePlayer ) then setElementAlpha(objeto,255); else return false; end end end end)
Tomas Posted May 1, 2015 Posted May 1, 2015 Si ya sabia, era una manera de abreviar y no decirlo todo eran las 4am .-. jaja, Alguna otra sugerencia para hacer eso? Osea que sabías pero posteaste totalmente lo contrario, k.
lucascba Posted May 1, 2015 Author Posted May 1, 2015 Intenta con esto. no lo he probado addCommandHandler("visible", function(thePlayer) if not objeto then local my_position = {getElementPosition( thePlayer )}; objeto = createObject(700, unpack(my_position)); setElementCollisionsEnabled(objeto,false); setElementAlpha(objeto,0); outputChatBox("El objeto no habia sido creado anteriormente. Ahora se creó exitosamente!", thePlayer); else for _, player in ipairs(getElementsByType("player")) do if ( player == thePlayer ) then setElementAlpha(objeto,255); else return false; end end end end) No funciona
Enargy, Posted May 1, 2015 Posted May 1, 2015 Intenta con esto. no lo he probado addCommandHandler("visible", function(thePlayer) if not objeto then local my_position = {getElementPosition( thePlayer )}; objeto = createObject(700, unpack(my_position)); setElementCollisionsEnabled(objeto,false); setElementAlpha(objeto,0); outputChatBox("El objeto no habia sido creado anteriormente. Ahora se creó exitosamente!", thePlayer); else for _, player in ipairs(getElementsByType("player")) do if ( player == thePlayer ) then setElementAlpha(objeto,255); else return false; end end end end) No funciona Entonces tendrías que hacer el script en clientside y luego triggear a serverside.
Recommended Posts