OnPlayerConnect
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file)) {
dini_Create(file);
dini_IntSet(file, \"Score\", 0);
dini_IntSet(file, \"Money\", 0);
dini_IntSet(file, \"Kills\", Killz[playerid]);
dini_IntSet(file, \"Deaths\", Deathz[playerid]);
dini_IntSet(file, \"Skin\", 0);
SetPlayerScore(playerid, dini_Int(file, \"Score\"));
SetPlayerMoney(playerid, dini_Int(file, \"Money\"));
SetPlayerSkin(playerid, dini_Int(file, \"Skin\"));
}
else {
SetPlayerScore(playerid, dini_Int(file, \"Score\"));
SetPlayerMoney(playerid, dini_Int(file, \"Money\"));
SetPlayerSkin(playerid, dini_Int(file, \"Skin\"));
}
OnPlayerDisconnect
new pname[128];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), savefolder,pname);
if(!dini_Exists(file)) {
}
else {
dini_IntSet(file, \"Score\", GetPlayerScore(playerid));
dini_IntSet(file, \"Money\", GetPlayerMoney(playerid));
dini_IntSet(file, \"Kills\", Killz[playerid]);
dini_IntSet(file, \"Deaths\", Deathz[playerid]);
dini_IntSet(file, \"Skin\", GetPlayerSkin(playerid));
}
OnPlayerDeath
Killz[killerid] ++;
Deathz[playerid] ++;
Dupla hozzászólás automatikusan összefûzve. ( 2014. július 01. - 15:30:38 )
És igen, lementeni lementi. Csak nem tölti be..