05.03.2015, 20:29
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?
De antemano, muchas gracias.
PHP код:
DrawSed[playerid] = CreatePlayerTextDraw(playerid, 620.800048, 188.159988, "hud:radar_diner");
PlayerTextDrawLetterSize(playerid, DrawSed[playerid], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, DrawSed[playerid], 15.999938, 18.666687);
PlayerTextDrawAlignment(playerid, DrawSed[playerid], 1);
PlayerTextDrawColor(playerid, DrawSed[playerid], 0xFFFFFFFF);
PlayerTextDrawSetShadow(playerid, DrawSed[playerid], 0);
PlayerTextDrawSetOutline(playerid, DrawSed[playerid], 0);
PlayerTextDrawFont(playerid, DrawSed[playerid], 4);
DrawHambre[playerid] = CreatePlayerTextDraw(playerid, 620.800048, 209.813339, "hud:radar_pizza");
PlayerTextDrawLetterSize(playerid, DrawHambre[playerid], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, DrawHambre[playerid], 15.999938, 18.666656);
PlayerTextDrawAlignment(playerid, DrawHambre[playerid], 1);
PlayerTextDrawColor(playerid, DrawHambre[playerid], 0xFFFFFFFF);
PlayerTextDrawSetShadow(playerid, DrawHambre[playerid], 0);
PlayerTextDrawSetOutline(playerid, DrawHambre[playerid], 0);
PlayerTextDrawFont(playerid, DrawHambre[playerid], 4);
public ActualizarNecesidades(playerid)
{
switch(Informacion[playerid][pHambre])
{
case 0 .. 19:
{
PlayerTextDrawColor(playerid, DrawHambre[playerid], -16711681);
}
case 20 .. 49:
{
PlayerTextDrawColor(playerid, DrawHambre[playerid], -5963521);
}
case 50 .. 79:
{
PlayerTextDrawColor(playerid, DrawHambre[playerid], -65281);
}
case 80 .. 100:
{
PlayerTextDrawColor(playerid, Textdraw1[playerid], 16711935);
}
}
switch(Informacion[playerid][pSed])
{
case 0 .. 19:
{
PlayerTextDrawColor(playerid, DrawSed[playerid], -16711681);
}
case 20 .. 49:
{
PlayerTextDrawColor(playerid, DrawSed[playerid], -5963521);
}
case 50 .. 79:
{
PlayerTextDrawColor(playerid, DrawSed[playerid], -65281);
}
case 80 .. 100:
{
PlayerTextDrawColor(playerid, DrawSed[playerid], 16711935);
}
}
return 1;
}