30.03.2014, 07:46
Quote:
In your script using code editor (Pawno) press CTRL and F and put LoadPoints
|
PHP Code:
LoadPoints()
{
new arrCoords[9][64];
new strFromFile2[256];
new File: file = fopen("points.cfg", io_read);
if (file)
{
new idx;
while (idx < sizeof(Points))
{
fread(file, strFromFile2);
splits(strFromFile2, arrCoords, '|');
Points[idx][Pointx] = floatstr(arrCoords[0]);
Points[idx][Pointy] = floatstr(arrCoords[1]);
Points[idx][Pointz] = floatstr(arrCoords[2]);
Points[idx][Type] = strval(arrCoords[3]);
Points[idx][Vulnerable] = strval(arrCoords[4]);
strmid(Points[idx][Owner], arrCoords[5], 0, strlen(arrCoords[5]), 255);
strmid(Points[idx][CapperName], arrCoords[6], 0, strlen(arrCoords[6]), 255);
strmid(Points[idx][Name], arrCoords[7], 0, strlen(arrCoords[7]), 255);
Points[idx][MatPoint] = strval(arrCoords[8]);
//printf("%s Type:%d Owner:%s",Points[idx][Name],Points[idx][Type],Points[idx][Owner]);
Points[idx][CaptureTimerEx2] = -1;
Points[idx][ClaimerId] = INVALID_PLAYER_ID;
Points[idx][PointPickupID] = CreateDynamicPickup( 1239, 23, Points[idx][Pointx], Points[idx][Pointy], Points[idx][Pointz]);
idx++;
}
fclose(file);
}
return 1;
}