help Loading and deleting objects - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help Loading and deleting objects (
/showthread.php?tid=549587)
help Loading and deleting objects -
_Application_ - 07.12.2014
I want to load objects from the file, it will be possible to destroy them
this is load objects from file,
PHP код:
stock LoadObjectsFromFile(const filename[])
{
new
File:file = fopen(filename, io_read);
if (!file) return 0;
new
line[128],
count,
modelid,
Float:X, Float:Y, Float:Z,
Float:rX, Float:rY, Float:rZ;
while (fread(file, line))
{
if (!sscanf(line, "iffffff", modelid, X, Y, Z, rX, rY, rZ))
{
ActivityObject[line] = CreateObject(modelid, X, Y, Z, rX, rY, rZ);
count++;
}
}
fclose(file);
return count;
}
It deletes the objects I have argued from the file,
PHP код:
DestroyDynamicObject(ActivityObject[line]);
Would love to have a revised code

sorry my bad english..
Re : help Loading and deleting objects -
ManuelNeuer - 07.12.2014
Do the same thing
Re: help Loading and deleting objects -
_Application_ - 07.12.2014
How?