26.04.2018, 17:01
you can do it by this
you can use it like this
SendPlayerText(playerid, EROR_TEXT, COLOR_BLUE);
or use this code
PHP код:
stock SendPlayerText(playerid, message, color)
{
new string[128];
case EROR_TEXT: format(string, sizeof(string), "Command incorrect.");
case TEXT_INFO: format(string, sizeof(string), "This is Test.");
case TEXT_GUN: format(string, sizeof(string), "This is Gun Test.");
SendClientMessage(playerid, color, message);
return 1;
}
SendPlayerText(playerid, EROR_TEXT, COLOR_BLUE);
or use this code
PHP код:
new EROR_TEXT, TEXT_INFO, TEXT_GUN;
stock SendPlayerText(playerid, message, color)
{
if(message == EROR_TEXT)
{
SendClientMessage(playerid, color, "Command incorrect.");
}
if(message == TEXT_INFO)
{
SendClientMessage(playerid, color, "This is Test.");
}
if(message == TEXT_GUN)
{
SendClientMessage(playerid, color, "This is Gun Test.");
}
return 1;
}
//SendPlayerText(playerid, EROR_TEXT, COLOR_BLUE);