04.08.2010, 01:22
pawn Код:
format(string, sizeof(string), "/users/%s.ini", playername);
printf("%s", string); // debug
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
}
format(string, sizeof(string), "/Vehicles/Players/%s.cfg", playername);
printf("%s", string); // debug
if(dini_Exists(string))
{
strmid(PlayerVehicle[playerid][pVeh1], dini_Get(string, "Vehicle1"), 0, strlen(dini_Get(string, "Vehicle1")), 255);
strmid(PlayerVehicle[playerid][pVeh2], dini_Get(string, "Vehicle2"), 0, strlen(dini_Get(string, "Vehicle2")), 255);
strmid(PlayerVehicle[playerid][pVeh3], dini_Get(string, "Vehicle3"), 0, strlen(dini_Get(string, "Vehicle3")), 255);
strmid(PlayerVehicle[playerid][pVeh4], dini_Get(string, "Vehicle4"), 0, strlen(dini_Get(string, "Vehicle4")), 255);
strmid(PlayerVehicle[playerid][pVeh5], dini_Get(string, "Vehicle5"), 0, strlen(dini_Get(string, "Vehicle5")), 255);
return 1;
}
else
{
dini_Create(string);
strmid(PlayerVehicle[playerid][pVeh1], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh2], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh3], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh4], "None", 0, strlen("None"), 255);
strmid(PlayerVehicle[playerid][pVeh5], "None", 0, strlen("None"), 255);
//return 1;
}