Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- forward RandColor(playerid);
- new RandCol[] =
- {
- 0xFF0000FF, 0x00FF00FF, 0x0000FFFF, 0xFFFFFFFF, 0x000000FF,
- 0xFF00FFFF, 0xF0F8FFFF, 0xFAEBD7FF, 0x00FFFFFF, 0x7FFFD4FF,
- 0xF0FFFFFF, 0xA52A2AFF, 0x008B8BFF, 0xE9967AFF, 0x00BFFFFF,
- 0xFFD700FF, 0x808080FF, 0x008000FF, 0x800000FF, 0x000080FF
- };
- public OnPlayerConnect(playerid)
- {
- SetTimerEx("RandColor", 3000, true, "i", playerid);
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new chat[128], name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(chat, sizeof(chat), "{%06x}%s{FFFFFF} [%d]: %s", GetPlayerColor(playerid) >>> 8, name, playerid, text);
- SendClientMessageToAll(-1, chat);
- return 0;
- }
- public RandColor(playerid)
- {
- new rand = random(sizeof(RandCol));
- SetPlayerColor(playerid, RandCol[rand]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement