09.03.2010, 23:49
Ok, so i have this code OnplayerConnect so when the player connect it creates the files but for some reason it's not creating a file can someone help me out?
pawn Код:
new str[128];
format(str, sizeof(str), "Cars/CarKeys/%s.%s.cfg", str);
if(dini_Exists(str))
{
strmid(CarKeys[playerid][cCarkey], dini_Get(str, "Vehicle1"), 0, strlen(dini_Get(str, "Vehicle1")), 255);
strmid(CarKeys[playerid][cCarkey2], dini_Get(str, "Vehicle2"), 0, strlen(dini_Get(str, "Vehicle2")), 255);
strmid(CarKeys[playerid][cCarkey3], dini_Get(str, "Vehicle3"), 0, strlen(dini_Get(str, "Vehicle3")), 255);
}
else
{
dini_Create(str);
strmid(CarKeys[playerid][cCarkey], "None", 0, strlen("None"), 255);
strmid(CarKeys[playerid][cCarkey2], "None", 0, strlen("None"), 255);
strmid(CarKeys[playerid][cCarkey3], "None", 0, strlen("None"), 255);
}
return 1;
}