SA-MP Forums Archive
question about colors - 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: question about colors (/showthread.php?tid=444583)



question about colors - 5002 - 17.06.2013

hello friends
sorry if i post this topic
cause i search and dont found my answer


on commands
i tell gamemode

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if(!strcmp(cmdtext,"/help"))
   {
	   SendClientMessage(playerid, 0xffffffff,"{COLOR_Red_EMBED}SERVER:{COLOR_White_EMBED}You can {COLOR_Yellow_EMBED}ask {COLOR_White_EMBED}your {COLOR_Yellow_EMBED}questions {COLOR_White_EMBED}on {COLOR_Red_EMBED}help chat{COLOR_White_EMBED}(use /h your Question)");
	   return 1;
   }
   return 0;
}
defins:

#define COLOR_Red_EMBED "(#FF6347)"
#define COLOR_Yellow_EMBED "(#FFFF00)"
#define COLOR_White_EMBED "(#FFFFFF)"

but when i type /help
message dont showed

whats problem?
also if you see any wrong move on my script tell me


Re: question about colors - InTeL_cOrE_i7 - 17.06.2013

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
                SendClientMessage(playerid, 0xffffffff,"{COLOR_Red_EMBED}SERVER:{COLOR_White_EMBED}You can {COLOR_Yellow_EMBED}ask {COLOR_White_EMBED}your {COLOR_Yellow_EMBED}questions {COLOR_White_EMBED}on     {COLOR_Red_EMBED}help chat{COLOR_White_EMBED}(use /h your Question)");
		return 1;
	}
	return 0;
}
thinks this should work


AW: question about colors - HurtLocker - 17.06.2013

When you define a color like you do, #define COLOR_White_EMBED "{FFFFFF}" <-- fixed, then you use it in strings like this:
SendClientMessage(playerid, -1, ""COLOR_White_EMBED"Fire in the hole!");

EDIT: You must define it like this: #define COLOR_White_EMBED "{FFFFFF}"


Re: question about colors - 5002 - 17.06.2013

ok this work
i change format to
SendClientMessage(playerid, -1 ""COLOR_Red_EMBED"SERVER:"COLOR_White_EMBED")

but dont change text colours
only show my define (#FF6347)


Re: question about colors - 5002 - 17.06.2013

anyone can help??


Re: question about colors - Kudoz - 17.06.2013

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp(cmdtext, "/help", true) == 0)
   {
	   SendClientMessage(playerid, 0xffffffff,"{COLOR_Red_EMBED}SERVER:{COLOR_White_EMBED}You can {COLOR_Yellow_EMBED}ask {COLOR_White_EMBED}your {COLOR_Yellow_EMBED}questions {COLOR_White_EMBED}on {COLOR_Red_EMBED}help chat{COLOR_White_EMBED}(use /h your Question)");
	   return 1;
   }
   return 0;
}



Re: question about colors - 5002 - 17.06.2013

dont work

any one can writh full code for this??

or tell me whats prob?


AW: question about colors - HurtLocker - 17.06.2013

Read my above post carefully.


Re: question about colors - ReVo_ - 17.06.2013

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
   if (strcmp(cmdtext, "/help", true) == 0)
   {
	   SendClientMessage(playerid, 0xffffffff,"{"#COLOR_Red_EMBED"}SERVER:{"#COLOR_White_EMBED"}You can {"#COLOR_Yellow_EMBED"}ask {"#COLOR_White_EMBED"}your {"#COLOR_Yellow_EMBED"}questions {"#COLOR_White_EMBED"}on {"#COLOR_Red_EMBED"}help chat{"#COLOR_White_EMBED"}(use /h your Question)");
	   return 1;
   }
   return 0;
}



Re: AW: question about colors - 5002 - 18.06.2013

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
When you define a color like you do, #define COLOR_White_EMBED "{FFFFFF}" <-- fixed, then you use it in strings like this:
SendClientMessage(playerid, -1, ""COLOR_White_EMBED"Fire in the hole!");

EDIT: You must define it like this: #define COLOR_White_EMBED "{FFFFFF}"

Tank you all brothers

Problem fixed with this post

on defines must be
#define COLOR_RED_EMBED {ffffff}
no
#define COLOR_RED_EMBED {#ffffff}