18.03.2011, 12:08
So, I'm trying Y_INI knowing that it's the fastest, and I don't know how to use "Parse File" to open the file and load the strings/etc. I can only save it.
Thanks.
Thanks.
INI_ParseFile(file, "LoginAcc", false, true, playerid, true, false);
forward LoginAcc(playerid, name[ ], value[ ]);
public LoginAcc(playerid, name[ ], value[ ])
{
if(strcmp(name,"Password")) SetPVarString(playerid,"pPass",value);
if(!strcmp(name, "Level", false) ) {
PInfo[playerid][Level1] = strval(value);
}
if(!strcmp(name, "VIP", false) ) {
PInfo[playerid][VIP] = strval(value);
}
if(!strcmp(name, "Deaths", false) ) {
PInfo[playerid][Deaths1] = strval(value);
}
if(!strcmp(name, "Cash", false) ) {
PInfo[playerid][Cash] = strval(value);
}
if(!strcmp(name, "Score", false) ) {
PInfo[playerid][Score] = strval(value);
}
if(!strcmp(name, "Kills", false) ) {
PInfo[playerid][Kills1] = strval(value);
}
if(!strcmp(name, "Deaths", false) ) {
PInfo[playerid][Deaths1] = strval(value);
}
return 1;
}
Here's an example:
pawn Код:
pawn Код:
|
if(strcmp(name,"Password")) SetPVarString(playerid,"pPass",value);