12.12.2014, 12:20
this is not work , help please :
I want it to be always different color, example:
{red}•••••••••{blue}•••••••••{yellow}•••••••••
{yellow}•••••••••{red}•••••••••{blue}•••••••••
{blue}•••••••••{yellow}•••••••••{red}•••••••••
Hope you understand me, thanks in advance
PHP код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new KillColorChange;
new Color[]={
"FF0000",
"FFFF00",
"FF8800",
"9F785A",
"8A7EA1"
};
public OnPlayerConnect(playerid)
{
KillColorChange = SetTimerEx("ColorChange", 1000, true, "d", playerid);
return 1;
}
forward ColorChange(playerid);
public ColorChange(playerid)
{
new string[128];
format(string, sizeof(string), "{%s}•••••••••{%s}•••••••••{%s}•••••••••", random(sizeof(Color)), random(sizeof(Color)), random(sizeof(Color)));
SendClientMessage(playerid, -1, string);
return 1;
}
public OnPlayerSpawn(playerid)
{
KillTimer(KillColorChange);
return 1;
}
{red}•••••••••{blue}•••••••••{yellow}•••••••••
{yellow}•••••••••{red}•••••••••{blue}•••••••••
{blue}•••••••••{yellow}•••••••••{red}•••••••••
Hope you understand me, thanks in advance