little help
#4

Quote:
Originally Posted by feedme
Посмотреть сообщение
You have to define colors, when you want to use them.

#define COLOR_BLUE 0xFF0000FF

SendClientMessageToAll(COLOR_BLUE, "Test");

or you just use the ColorCode directly:

SendClientMessageToAll(0xFF0000FF, "Text");

Or just white (unformated):

SendClientMessageToAll(-1, "Text");
Код:
#define FILTERSCRIPT //////////////////////////////////////////////////////

#include <a_samp> // SAMP standart include
#pragma tabsize 0
#define red "{FF002B}"
#define pink "{FF00D9}"
#define purple "{DFA7F2}"
#define blue "{A1C2FF}"
#define green "{3DE3B1}"
#define yellow "{FAF623}"
#define black "{69670C}"
#define orange "{F2C80C}"
#define ice "{03F2FF}"
#define lime "{00FF40}"
static title[][10] =
{
""#red"",
""#pink"",
""#purple"",
""#blue"",
""#green"",
""#yellow"",
""#black"",
""#orange"",
""#ice"",
""#lime""
};
static message[][9] =
{
""#red"",
""#pink"",
""#purple"",
""#blue"",
""#green"",
""#yellow"",
""#black"",
""#orange"",
""#ice"",
""#lime""
};
static id[][9] =
{
""#red"",
""#pink"",
""#purple"",
""#blue"",
""#green"",
""#yellow"",
""#black"",
""#orange"",
""#ice"",
""#lime""
};

public OnPlayerText(playerid, text[])
{
    // Make the changes according you like. I did this on my script as I like
    new rand = random(sizeof(title)); // Random from array 'title'
    new rand2 = random(sizeof(id)); // Random from array 'id'
    new rand3 = random(sizeof(message)); // Random from array 'message'
    static name[MAX_PLAYER_NAME],string[128]; // Defining the 'string' and the 'name'
	GetPlayerName(playerid,name,sizeof(name)); // Here, we get the player name
	format(string,sizeof(string),"%s%s %s(%d): %s%s",title[rand][0],name,id[rand2][0],playerid,message[rand3][0],text); // formating the string which will be sent
	SendClientMessageToAll(color, string); // Here we send the string for all :P
        return 0; // Dont forget that
}
see this
Reply


Messages In This Thread
little help - by RaajParker - 10.12.2015, 11:04
Re: little help - by thefirestate - 10.12.2015, 11:10
Re: little help - by feedme - 10.12.2015, 11:11
Re: little help - by RaajParker - 10.12.2015, 11:22
Re: little help - by feedme - 10.12.2015, 11:27

Forum Jump:


Users browsing this thread: 1 Guest(s)