14.04.2009, 15:55
I made this code:
This code just randomly changes a cars colors. But the problem is that I can't make it stop. I also made a "rainbowoff" cmd which only had "killtimer(timer1)", but it still didn't want to stop. Please help
Код:
new timer1;
Код:
if (strcmp("/rainbow", cmdtext, true, 10) == 0)
{
new aa=0,bb;
aa++;
bb = aa%2;
if(bb == 0)
{
KillTimer(timer1);
}
timer1 = SetTimerEx("rainbow",50,1,"i",playerid);
return 1;
}
Код:
forward rainbow(playerid);
public rainbow(playerid)
{
new ab, ac;
ab=random(127);
ac=random(127);
new veh;
veh = GetPlayerVehicleID(playerid);
ChangeVehicleColor(veh, ab, ac);
}

