help Loading and deleting objects
#1

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(filenameio_read);
    if (!
file) return 0;
    new
        
line[128],
          
count,
          
modelid,
          
Float:XFloat:YFloat:Z,
          
Float:rXFloat:rYFloat:rZ;
    while (
fread(fileline))
    {
        if (!
sscanf(line"iffffff"modelidXYZrXrYrZ))
          {
            
ActivityObject[line] = CreateObject(modelidXYZrXrYrZ);
            
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..
Reply
#2

Do the same thing
Reply
#3

How?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)