SA-MP Forums Archive
Reading objects, pickups and spawns from a .txt file? - 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: Reading objects, pickups and spawns from a .txt file? (/showthread.php?tid=363601)



Reading objects, pickups and spawns from a .txt file? - Gangs_Rocks - 28.07.2012

Okay, So what I wanna do is:

I wanna read object lines, Pickup lines and spawn lines from .txt files.
These objects and pickups and spawns change on every map.

I know HOW to read stuff from a file in small quantities and apply it but not when there are upto 200 objects.


Re: Reading objects, pickups and spawns from a .txt file? - [MM]RoXoR[FS] - 28.07.2012

Код:
//Open File
for(new i = 0;i<200;++i)
{
    new obid;
    //Read line
    obid = ;//get Object id by reading line
}
//Close file
Also, you can make infinite loop.
Break loop when obid is either NULL or INVALID.


Re: Reading objects, pickups and spawns from a .txt file? - Gangs_Rocks - 28.07.2012

im using SII,+ I didnt understand what you said ...