SA-MP Forums Archive
[Ayuda] TextDraw no cambia de color. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [Ayuda] TextDraw no cambia de color. (/showthread.php?tid=566407)



[Ayuda] TextDraw no cambia de color. - Ghost112397 - 05.03.2015

Buenas, estaba intentando hacer que dependiendo del valor de una variable, el color del Textdraw cambiara, pero no pasa nada, siempre queda del mismo color, їalguien podrнa ayudarme por favor?
PHP код:
    DrawSed[playerid] = CreatePlayerTextDraw(playerid620.800048188.159988"hud:radar_diner");
    
PlayerTextDrawLetterSize(playeridDrawSed[playerid], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridDrawSed[playerid], 15.99993818.666687);
    
PlayerTextDrawAlignment(playeridDrawSed[playerid], 1);
    
PlayerTextDrawColor(playeridDrawSed[playerid], 0xFFFFFFFF);
    
PlayerTextDrawSetShadow(playeridDrawSed[playerid], 0);
    
PlayerTextDrawSetOutline(playeridDrawSed[playerid], 0);
    
PlayerTextDrawFont(playeridDrawSed[playerid], 4);
    
DrawHambre[playerid] = CreatePlayerTextDraw(playerid620.800048209.813339"hud:radar_pizza");
    
PlayerTextDrawLetterSize(playeridDrawHambre[playerid], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridDrawHambre[playerid], 15.99993818.666656);
    
PlayerTextDrawAlignment(playeridDrawHambre[playerid], 1);
    
PlayerTextDrawColor(playeridDrawHambre[playerid], 0xFFFFFFFF);
    
PlayerTextDrawSetShadow(playeridDrawHambre[playerid], 0);
    
PlayerTextDrawSetOutline(playeridDrawHambre[playerid], 0);
    
PlayerTextDrawFont(playeridDrawHambre[playerid], 4);
public 
ActualizarNecesidades(playerid)
{
    switch(
Informacion[playerid][pHambre])
    {
        case 
.. 19:
        {
            
PlayerTextDrawColor(playeridDrawHambre[playerid], -16711681);
        }
        case 
20 .. 49:
        {
            
PlayerTextDrawColor(playeridDrawHambre[playerid], -5963521);
        }
        case 
50 .. 79:
        {
            
PlayerTextDrawColor(playeridDrawHambre[playerid], -65281);
        }
        case 
80 .. 100:
        {
            
PlayerTextDrawColor(playeridTextdraw1[playerid], 16711935);
        }
    }
    switch(
Informacion[playerid][pSed])
    {
        case 
.. 19:
        {
            
PlayerTextDrawColor(playeridDrawSed[playerid], -16711681);
        }
          case 
20 .. 49:
        {
            
PlayerTextDrawColor(playeridDrawSed[playerid], -5963521);
        }
        case 
50 .. 79:
        {
            
PlayerTextDrawColor(playeridDrawSed[playerid], -65281);
        }
        case 
80 .. 100:
        {
            
PlayerTextDrawColor(playeridDrawSed[playerid], 16711935);
        }
    }
    return 
1;

De antemano, muchas gracias.


Respuesta: [Ayuda] TextDraw no cambia de color. - OTACON - 05.03.2015

es que tienes que ....

.. ocultar el textdraw
.. cambiar el color
.. mostrar el textdraw

saludos.



Respuesta: [Ayuda] TextDraw no cambia de color. - Swedky - 06.03.2015

Quote:
Originally Posted by OTACON
Посмотреть сообщение
es que tienes que ....

.. ocultar el textdraw
.. cambiar el color
.. mostrar el textdraw

saludos.
De hecho el primer paso es INNECESARIO.


Respuesta: [Ayuda] TextDraw no cambia de color. - OTACON - 06.03.2015

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
De hecho el primer paso es INNECESARIO.
de hecho lo correcto no seria innecesaria, pero es innecesario ya que al mostrarlo se actualiza el textdraw.
saludos.