How i put colors in label - 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: How i put colors in label (
/showthread.php?tid=420807)
How i put colors in label -
DerickClark - 06.03.2013
i wanna it like dis:
/label [Text] [Color] [Distance]
here my command:
Код:
COMMAND:label(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 7)
{
new string[160],Float: X, Float: Y, Float: Z,text[100],distance;
GetPlayerPos(playerid, X,Y,Z);
if(sscanf(params,"sd",text,distance)) return SendClientMessage(playerid,0xFB9204FF,"USAGE: /label [text][distance]");
Create3DTextLabel(text,0x03B8FCFF,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
format(string,sizeof(string),"Create3DTextLabel(\"%s\",0x03B8FCFF,%f, %f, %f,%d,%d);",text,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
SaveToLog("labels",string);
}
return 1;
}
Re: How i put colors in label -
Salim_Karaja - 07.03.2013
give it a try:
pawn Код:
COMMAND:label(playerid,params[])
{
if (APlayerData[playerid][PlayerLevel] >= 7)
{
new string[160],Float: X, Float: Y, Float: Z,text[100],distance,color;
GetPlayerPos(playerid, X,Y,Z);
if(sscanf(params,"sxd",text,color,distance)) return SendClientMessage(playerid,0xFB9204FF,"USAGE: /label [text] [color] [distance]");
Create3DTextLabel(text,color,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
format(string,sizeof(string),"Create3DTextLabel(\"%s\",color,%f, %f, %f,%d,%d);",text,X,Y,Z,distance,GetPlayerVirtualWorld(playerid));
SaveToLog("labels",string);
}
return 1;
}