Das ist mein registersystem, wie mache ich dass, das der mir die Killst, Tode,Rank und gTeam sowie gLeader savet?
dcmd_register(playerid, params[])
{
if (IsPlayerConnected(playerid))
{
new string[256];
new password[100];
new Player[MAX_PLAYER_NAME];
GetPlayerName(playerid, Player, sizeof(Player));
format(string, sizeof(string), "%s.ini", Player);
if (sscanf(params, "s", password))
{
return SendClientMessage(playerid, 0xffffff, " /register password");
}
if (dini_Exists(string))
{
return SendClientMessage(playerid, 0xffffff, " Der name ist bereits registriert");
}
else
{
dini_Create(string);
dini_Set(string, "password", password);
dini_IntSet(string, "score", 0);
dini_IntSet(string, "cash", 0);
SendClientMessage(playerid, 0xffffff, " Bitte einloggen: /login password");
}
}
return 1;
}
dcmd_login(playerid, params[])
{
if (IsPlayerConnected(playerid))
{
new string[256];
new password[100];
new Player[MAX_PLAYER_NAME];
GetPlayerName(playerid, Player, sizeof(Player));
format(string, sizeof(string), "%s.ini", Player);
if (sscanf(params, "s", password))
{
return SendClientMessage(playerid, 0xffffff, " /register password");
}
if (dini_Exists(string))
{
PlayerInfo[playerid][ppassword] = dini_Int(string, "password");
if (strcmp(password, PlayerInfo[playerid][ppassword], false, strlen(PlayerInfo[playerid][ppassword])) != 0)
{
return SendClientMessage(playerid, 0xffffff, " flasches password");
}
gLogged[playerid] = 1;
PlayerInfo[playerid][pscore] = dini_Int(string, "score");
PlayerInfo[playerid][pcash] = dini_Int(string, "cash");
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pcash]);
UpdateTimer = SetTimer("OnPlayerUpdate", 2000, 1);
SpawnPlayer(playerid);
}
}
return 1;
}
bitte um hilfe