SA-MP Forums Archive
color define help - 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: color define help (/showthread.php?tid=336844)



color define help - Michael_Cuellar - 23.04.2012

i got these on my script
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF

Everytime i try to use one I get this
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(289) : error 017: undefined symbol "COLOR_YELLOW"

im new to scripting


Re: color define help - Scripter12345 - 23.04.2012

Quote:
Originally Posted by Michael_Cuellar
Посмотреть сообщение
i got these on my script
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF

Everytime i try to use one I get this
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(289) : error 017: undefined symbol "COLOR_YELLOW"

im new to scripting
Show the bit of code your trying to use the colour in


Re: color define help - Michael_Cuellar - 23.04.2012

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill()", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have commited suicide!");

return 1;
}
return 0;
}


Re: color define help - Scripter12345 - 23.04.2012

Quote:
Originally Posted by Michael_Cuellar
Посмотреть сообщение
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill()", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have commited suicide!");

return 1;
}
return 0;
}
Try this


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill()", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA , "(INFO) You have commited suicide!");

return 1;
}
return 0;
}



Re: color define help - Michael_Cuellar - 23.04.2012

It works only a loose indention now


Re: color define help - .FuneraL. - 23.04.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp("/Kill()", cmdtext, true, 10) == 0)
     {
           SetPlayerHealth(playerid, 0);
           SendClientMessage(playerid, 0xFFFF00AA , "(INFO) You have commited suicide!");
           return 1;
     }
     return 0;
}



Re: color define help - Scripter12345 - 23.04.2012

Quote:
Originally Posted by Michael_Cuellar
Посмотреть сообщение
It works only a loose indention now
Try this

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill()", cmdtext, true, 10) == 0)
{
    SetPlayerHealth(playerid, 0);
    SendClientMessage(playerid, 0xFFFF00AA , "(INFO) You have commited suicide!");

return 1;
}
return 0;
}



Re: color define help - .FuneraL. - 23.04.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp("/Kill()", cmdtext, true, 10) == 0)
     {
           SetPlayerHealth(playerid, 0);
           SendClientMessage(playerid, 0xFFFF00AA , "(INFO) You have commited suicide!");
           return 1;
     }
     return 0;
}



Re: color define help - Scripter12345 - 23.04.2012

Quote:
Originally Posted by Michael_Cuellar
Посмотреть сообщение
It works only a loose indention now
Try this

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Kill()", cmdtext, true, 10) == 0)
{
    SetPlayerHealth(playerid, 0);
    SendClientMessage(playerid, 0xFFFF00AA , "(INFO) You have commited suicide!");

return 1;
}
return 0;
}