18.04.2009, 17:31
Well here's what you need to do, methinks.
OnFilterScriptInit() you need to determine how many vehicles are already in the file
so something like
that would determine how many vehicles are already saved.
then in your command, instead of saving it to the 'i' variable, save it to the DynCars variable, and makesure to do DynCars++ at the end of the command, and make sure it isn't going over 700 at the beginning of the command so:
OnFilterScriptInit() you need to determine how many vehicles are already in the file
so something like
pawn Код:
// new DynCars; this would go uptop
new File:file = fopen("whatever",io_read);
new tmpstr[200];
for(new i; i <MAX_DYN_CARS;i++)
{
fread(file,tmpstr,sizeof(tmpstr));
if(!tmpstr[0])return 1;
else DynCars++;
}
then in your command, instead of saving it to the 'i' variable, save it to the DynCars variable, and makesure to do DynCars++ at the end of the command, and make sure it isn't going over 700 at the beginning of the command so:
pawn Код:
if(DynCars>700) return SendClientMessage(playerid,0xFF0000FF,"FAIL!");
...
// your command
...
DynCars++;
return 1;

