seteffect and changeimgvis should have parenthesis around the params. The image ID shouldn't be less than 200 if it's meant to only show on one player's screen, and the x/y coordinates are tile-based in the level, not pixel-based on the screen. In the for loop you need to set "client.time", not check it, and it won't get to 24 since your loop wants it to be less than or equal to 23. Otherwise, I agree with what Jer said.
Also, use PHP tags instead of CODE tags. It's easier to read.
Here's some of what you have fixed:
PHP Code:
//#CLIENTSIDE
function onCreated() {
client.time=0;
Initialize();
}
function Initialize() {
for (client.time = 0;client.time <= 24;client.time++) {
if (client.time >= 0 && client.time<2) {
seteffect(0, 0, 0, .7);
}
if (client.time >=3 && client.time <= 5) {
seteffect(0, 0, 0, .5);
}
if (client.time >= 6 && client.time <=8) {
seteffect(0, 0, 0, .3);
}
if (client.time >=9 && client.time <=12) {
seteffect(0, 0, 0, .1);
}
if (client.time >=13 && client.time <=17) {
seteffect(0, 0, 0, 0);
}
if (client.time >=18 && client.time <=21) {
seteffect(0, 0, 0, .3);
}
if (client.time >=22 && client.time <=24) {
seteffect 0,0,0,.5;
}
sleep(2);
if (client.time==24) {
client.time = 0;
}
echo(client.time);
showtext(200, 50, 150, $pref::graal::defaultfontname, "bc", "Time: " @ client.time @ ":00");
changeimgvis(200, 4);
}
}