SA-MP Forums Archive
Textdraw color - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw color (/showthread.php?tid=455944)



Textdraw color - Miksa - 03.08.2013

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 ?


Re: Textdraw color - Sk1lleD - 03.08.2013

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


Re: Textdraw color - Miksa - 03.08.2013

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);
    }
    }



Re: Textdraw color - Miksa - 04.08.2013

can anyone help ?


Re: Textdraw color - Sk1lleD - 04.08.2013

Код:
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
}



Re: Textdraw color - JusstinRoller - 04.08.2013

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;