29.03.2019, 11:24
Quote:
You can try experimenting with something like:
PHP Code:
|
Code:
while(fread(handle, data))
This is my current load function that loads file string normally from begining
PHP Code:
function givendmg_load(playerid){
new f[64]; format(f, 64, givendmg_file, GetName(playerid));
new Data[256], x=0, arrCoords[6][64];
new File:handle = fopen(f, io_read);
if(!fexist(f)) return printf("File %s ne postoji te se sistem nije ucitao", f);
while(fread(handle, Data)){
split(Data, arrCoords, ',');
strmid(givendmgInfo[playerid][x][dmgDate], arrCoords[0], 0, strlen(arrCoords[0]));
strmid(givendmgInfo[playerid][x][dmgTime], arrCoords[1], 0, strlen(arrCoords[1]));
strmid(givendmgInfo[playerid][x][dmgGivenTo], arrCoords[2], 0, strlen(arrCoords[2]));
strmid(givendmgInfo[playerid][x][dmgGivenBy], arrCoords[3], 0, strlen(arrCoords[3]));
givendmgInfo[playerid][x][dmgAmount] = strval(arrCoords[4]);
givendmgInfo[playerid][x][dmgWeapon] = strval(arrCoords[5]);
x++;
}
fclose(handle);
return 1;
}