07.10.2013, 11:34
pawn Код:
forward LoadCar(playerid);
public LoadCar(playerid)
{
new file[26], count, sname[MAX_PLAYER_NAME];
GetPlayerName(playerid, sname, sizeof(sname));
for(new idx; idx < sizeof(CarInfo) ; idx++)
{
format(file, sizeof(file),"LARP/Vehicles/%d-%s.ini", idx, sname);
if(fexist(file))
{
count++;
INI_ParseFile(file, "LoadVehicles_veh", .bExtra = true, .extra = idx);
printf("%s Loaded Car ID %d", sname, idx);
}
}
printf("[SCRIPT]: Loaded %s %d Owned Vehicles [Y_INI].", sname, idx);
return 1;
}
pawn Код:
format(file, sizeof(file),"LARP/Vehicles/%d-%s.ini", idx, sname);
if(fexist(file))
{
count++;
INI_ParseFile(file, "LoadVehicles_veh", .bExtra = true, .extra = idx);
printf("%s Loaded Car ID %d", sname, idx);
}