03.12.2012, 11:00
Ok at first It worked fine but then when I made a slit update to my script it wen't to an error here is the code.
pawn Код:
stock AddObjectFromFile(DFileName[])
{
if(!fexist(DFileName)) return 0;
new File:ObjectFile, Float:OX, Float:OY, Float:OZ, Float:ORX, Float:ORY, Float:ORZ, OVW, OINT, oTotal, Line[128];
ObjectFile = fopen(DFileName, io_read);
while(fread(ObjectFile, Line))
{
if(Line[0] == '/' || isnull(Line)) continue;
unformat(Line, "ffffffiii", OX, OY, OZ, ORX, ORY, ORZ, OVW, OINT, oModel);
CreateDynamicObject(oModel, Float:OX, Float:OY, Float:OZ, Float:ORX, Float:ORY, Float:ORZ, OVW, OINT, -1, 200.0);
oTotal++;
}
fclose(ObjectFile);
return oTotal;
}