05.02.2013, 18:38
PHP код:
forward PointCaptureTimer(point, time);
public PointCaptureTimer(point, time)
{
new string[124];
printf("Time1: %d", PointTimeLeft[point]);
if(PointFam[point] != 0)
{
printf("Time2: %d", PointTimeLeft[point]);
PointTimeLeft[point]--;
if(PointTimeLeft[point] == 0)
{
Point[point][poFid] = PointFam[point];
format(Point[point][poCapper], MAX_PLAYER_NAME, pNameEx(PointCapper[point]));
Point[point][poDate] = gettime();
format(string, sizeof(string), "%s has successfully captured \"%s\".", Families[famEnum(Point[point][poCapper])][fName], Point[GetPointRange(Point[point][poCapper])][poName]);
ProxDetector(70.0, Point[point][poCapper], string, COLOR_RED);
PointX[point] = 0;
PointY[point] = 0;
PointZ[point] = 0;
PointCapper[point] = -1;
PointFam[point] = 0;
PointID[point] = -1;
PointTimeToClaim[point] = 0;
PointTimeLeft[point] = 0;
KillTimer(captureTimer);
}
}
if(time > 0)
{
captureTimer = SetTimerEx("PointCaptureTimer", 1000, 0, "dd", GetPointRange(PointCapper[point]), time - 1);
printf("Timer: %d", time);
}
return 1;
}