Problema con textdraw -
M@ty - 24.09.2015
Hola, tengo un textdraw con dos franjas negras en la pantalla de login, y quise crear uno con el nombre del servidor, sobre una franja negra pero no se ve, que puedo hacer para que se vea?
Pense en ponerle color negro al fondo en la linea TextDrawBackgroundColor(login, 255); pero no se cual es el negro o si esa seria la solucion.
Gracias.
Re: Problema con textdraw -
RIDE2DAY - 24.09.2015
Ten en cuenta una cosa, si haces lo siguiente no te va a funcionar:
PHP код:
public OnGameModeInit()
{
g_ServerName = TextDrawCreate();
g_Background = TextDrawCreate();
return 1;
}
/* No te va a funcionar ya que g_Background se crea DESPUЙS de g_ServerName y lo tapa, entonces no se verб el texto. */
Lo ideal serнa ponerlo en este orden:
PHP код:
public OnGameModeInit()
{
g_Background = TextDrawCreate();
g_ServerName = TextDrawCreate();
return 1;
}
/* Ahora g_ServerName se deberнa crear encima del fondo negro y se verнa perfectamente. */
Por otro lado, si por casualidad sospechas que estбs alcanzando el lнmite mбximo de los TextDraws deberнas leerte
йste tutorial.
Respuesta: Re: Problema con textdraw -
M@ty - 24.09.2015
Quote:
Originally Posted by RIDE2DAY
Ten en cuenta una cosa, si haces lo siguiente no te va a funcionar:
PHP код:
public OnGameModeInit()
{
g_ServerName = TextDrawCreate();
g_Background = TextDrawCreate();
return 1;
}
/* No te va a funcionar ya que g_Background se crea DESPUЙS de g_ServerName y lo tapa, entonces no se verб el texto. */
Lo ideal serнa ponerlo en este orden:
PHP код:
public OnGameModeInit()
{
g_Background = TextDrawCreate();
g_ServerName = TextDrawCreate();
return 1;
}
/* Ahora g_ServerName se deberнa crear encima del fondo negro y se verнa perfectamente. */
Por otro lado, si por casualidad sospechas que estбs alcanzando el lнmite mбximo de los TextDraws deberнas leerte йste tutorial.
|
Disculpa, pero como defino ambos?
Re: Problema con textdraw -
RIDE2DAY - 24.09.2015
Para declararlos no importa el orden, pones fuera de cualquier callback (generalmente arriba del .pwn, debajo de los
include) lo siguiente:
PHP код:
new Text:g_Background;
new Text:g_ServerName;
A continuaciуn los creas en
OnGameModeInit en el orden que te comentй anteriormente.
Respuesta: Problema con textdraw -
M@ty - 24.09.2015

Y si pongo el nombre de mi textdraw en vez de TextDrawCreate me da errores.
Gracias.
Respuesta: Problema con textdraw -
xSeveNx - 24.09.2015
https://sampwiki.blast.hk/wiki/TextDrawCreate
https://sampwiki.blast.hk/wiki/TextDrawBackgroundColor
El segundo link da el ejemplo mas claro de como hay que hacerlo.
Respuesta: Problema con textdraw -
M@ty - 24.09.2015
Quote:
Originally Posted by xSeveNx
|
Mira tampoco se soluciona:
Код:
login = TextDrawCreate(176.000000, 57.000000, "Nombre Server");
TextDrawUseBox(login, 1);
TextDrawBackgroundColor(login, 0x000000FF); // Seria color negro
TextDrawFont(login, 2);
TextDrawLetterSize(login, 0.829999, 4.299997);
TextDrawColor(login, 12582911);
TextDrawSetOutline(login, 0);
TextDrawSetProportional(login, 0);
TextDrawSetShadow(login, 1)
Respuesta: Problema con textdraw -
xSeveNx - 24.09.2015
Que es lo que pasa pues.
Respuesta: Problema con textdraw -
M@ty - 24.09.2015
Quote:
Originally Posted by xSeveNx
Que es lo que pasa pues.
|
Creн que habнas entendido lo que pasaba. Lo explico claramente al comienzo del post.
Respuesta: Problema con textdraw -
M@ty - 28.09.2015
Revivo por que lo necesito!