Textdraw color
#1

does anyone know how can i change textdraw color with a command, in game ?

example, textdraw is red, ( SA:MP ), and when i type /tdblue, it changes its color ( SA:MP )

is there something like SetTextdrawColor, or something ?
Reply
#2

Here you go
https://sampwiki.blast.hk/wiki/TextDrawColor
next time try to search a bit
Reply
#3

you didn't understand me ..
i need function for color change, check the code ;

Код:
	if(engine == 0)
    {
    format(ES,sizeof(ES),"~r~o");
    TextDrawSetString(motor, ES);
    SetTextDrawColor(kmhstatus, -1061109505);
    SetTextDrawColor(gorivostatus, -1061109505);
    SetTextDrawColor(gpsstatus, -1061109505);
    }
    else
    {
    format(ES,sizeof(ES),"~g~o");
    TextDrawSetString(motor, ES);
    SetTextDrawColor(kmhstatus, 16777215);
    SetTextDrawColor(gorivostatus, 16777215);
    SetTextDrawColor(gpsstatus, 2474495);
    }
    }
Reply
#4

can anyone help ?
Reply
#5

Код:
if(engine == 0)
{
    format(ES,sizeof(ES),"~r~o");
    TextDrawSetString(motor, ES);
    TextDrawColor(kmhstatus, 0xFF0000FF); //RED
    SetTextDrawColor(gorivostatus, 0xFF0000FF); //RED
    SetTextDrawColor(gpsstatus, 0xFF0000FF); //RED
}
else
{
    format(ES,sizeof(ES),"~g~o");
    TextDrawSetString(motor, ES);
    TextDrawColor(kmhstatus, 0x00FF00FF); //GREEN
    TextDrawColor(gorivostatus, 0x00FF00FF); //GREEN
    TextDrawColor(gpsstatus, 0x00FF00FF); //GREEN
}
Reply
#6

shit here you go
PHP код:
CMD:tdblue(playerid,params[])
{
    new 
ES[24];
    
format(ES,sizeof(ES),"~b~o");
    
TextDrawSetString(motor,ES);
    
TextDrawColor(kmhstatus,0x0000FFFF);//blue
    
TextDrawColor(gorivostatus,0x0000FFFF);//blue too
    
TextDrawColor(gpsstatus,0x0000FFFF);//blue again
    
return 1;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)