03.09.2010, 02:43
How can i change this so it loads from mysql instead of files
pawn Код:
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
pawn Код:
if(dini_Exists(str)) {
strmid(PlayerInfo[playerid][pVeh1], dini_Get(str, "Vehicle1"), 0, strlen(dini_Get(str, "Vehicle1")), 255);
strmid(PlayerInfo[playerid][pVeh2], dini_Get(str, "Vehicle2"), 0, strlen(dini_Get(str, "Vehicle2")), 255);
strmid(PlayerInfo[playerid][pVeh3], dini_Get(str, "Vehicle3"), 0, strlen(dini_Get(str, "Vehicle3")), 255);
strmid(PlayerInfo[playerid][pVeh4], dini_Get(str, "Vehicle4"), 0, strlen(dini_Get(str, "Vehicle4")), 255);
strmid(PlayerInfo[playerid][pVeh5], dini_Get(str, "Vehicle5"), 0, strlen(dini_Get(str, "Vehicle5")), 255);
pToolkit[playerid] = dini_Int(str, "Toolkit");
// return 1;
}
else {
dini_Create(str);
strmid(PlayerInfo[playerid][pVeh1], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pVeh2], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pVeh3], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pVeh4], "None", 0, strlen("None"), 255);
strmid(PlayerInfo[playerid][pVeh5], "None", 0, strlen("None"), 255);
{
return 1;
}
}