26.05.2018, 01:54
That's not the idea I am trying to make. I am making a donor system whereas this level (5), you can select a custom color and and that color you selected has its own chat color.
Correct me if I didn't answer your question accordingly.
EDIT: This is what I am trying to do:
you use "/changecolor red" for example. when you type in the chat, the color would be something like this:
"Mag (0): Test".
So I am trying to store the color manually when you execute the command, when I try to define the colors with #define, this is what I get:
Error:
Correct me if I didn't answer your question accordingly.
EDIT: This is what I am trying to do:
you use "/changecolor red" for example. when you type in the chat, the color would be something like this:
"Mag (0): Test".
So I am trying to store the color manually when you execute the command, when I try to define the colors with #define, this is what I get:
PHP код:
#define RED ff0000
CMD:changecolor(playerid,params[])
{
new plcolor[50];
if(pinfo[playerid][donorlevel] < 1) return 0;
else if(pinfo[playerid][donorlevel] < 5) return SendClientMessage(playerid,COLOR_RED,"ERROR: Only donors level 5 have access to this command.");
if(sscanf(params, "s",plcolor)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /changecolor [color]");
if(!strcmp(plcolor,"red"))
{
pinfo[playerid][color] = RED; //line 467
Код:
C:\Users\Abderrahmene\Desktop\0.3.7\gamemodes\testserver1.pwn(467) : error 017: undefined symbol "ff0000"