03.08.2010, 23:27
(
Последний раз редактировалось MartinDee; 03.08.2010 в 23:38.
Причина: fail title
)
Hello everyone, I don't know what to do in this situation...
Look at the code which goes under public OnPlayerConnect
I know something is wrong right there, because when I connect, it doesn't load those files in Vehicles/Players/
In debug it loaded just *.ini files. How to load also Vehicles/Players/%s.cfg file?
Look at the code which goes under public OnPlayerConnect
Код:
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; }
In debug it loaded just *.ini files. How to load also Vehicles/Players/%s.cfg file?