question about colors
#1

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
Reply
#2

Код:
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
Reply
#3

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}"
Reply
#4

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)
Reply
#5

anyone can help??
Reply
#6

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

dont work

any one can writh full code for this??

or tell me whats prob?
Reply
#8

Read my above post carefully.
Reply
#9

Код:
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;
}
Reply
#10

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}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)