schon gut xD bei mir gibts grad stress also hier is es:
if (strcmp(cmd, "/Register", true)==0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, Farbe_Gelb, "TIPP: Benutze /Register >Dein Passwort<, um dich zu registrieren.");
return 1;
}
if (gPlayerAccount[playerid] == 1)
{
SendClientMessage(playerid, Farbe_Weis, "SERVER: Dein Nickname ist registriert.");
return 1;
}
strmid(PlayerInfo[playerid][pPasswort], tmp, 0, strlen(cmdtext), 255);
Encrypt(PlayerInfo[playerid][pPasswort]);
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s.ini", playername);
new File: file = fopen(string, io_read);
if (file)
{
SendClientMessage(playerid, Farbe_Weis, "SERVER: Dein Nickname ist registriert.");
fclose(file);
return 1;
}
new File:hFile;
hFile = fopen(string, io_append);
new var[32];
SetPlayerSkin(playerid, 101);
format(var, 32, "%s\n", PlayerInfo[playerid][pPasswort]); fwrite(hFile, var);
format(var, 32, "Level=%d\n", PlayerInfo[playerid][pLevel]); fwrite(hFile, var);
format(var, 32, "Adminlevel=%d\n", PlayerInfo[playerid][pAdmin]); fwrite(hFile, var);
format(var, 32, "Respekt=%d\n", PlayerInfo[playerid][pRespekt]); fwrite(hFile, var);
format(var, 32, "Job=%d\n", PlayerInfo[playerid][pJob]); fwrite(hFile, var);
format(var, 32, "Morde=%d\n", PlayerInfo[playerid][pMorde]); fwrite(hFile, var);
format(var, 32, "Tode=%d\n", PlayerInfo[playerid][pTode]); fwrite(hFile, var);
format(var, 32, "Geld=%d\n", PlayerInfo[playerid][pGeld]); fwrite(hFile, var);
format(var, 32, "Bank=%d\n", PlayerInfo[playerid][pBank]); fwrite(hFile, var);
format(var, 32, "Kleidung=%d\n", PlayerInfo[playerid][pKleidung]); fwrite(hFile, var);
format(var, 32, "Leader=%d\n", PlayerInfo[playerid][pLeader]); fwrite(hFile, var);
format(var, 32, "Member=%d\n", PlayerInfo[playerid][pMember]); fwrite(hFile, var);
format(var, 32, "Wanteds=%d\n", PlayerInfo[playerid][pWanteds]); fwrite(hFile, var);
PlayerInfo[playerid][pGeld] = 5000;
PlayerInfo[playerid][pBank] = 50000;
PlayerInfo[playerid][pKleidung] = 101;
ResetPlayerMoney(playerid);
fclose(hFile);
SendClientMessage(playerid, Farbe_Weis, " Du hast dich registriert.");
SendClientMessage(playerid, Farbe_Gelb, "TIPP: Benutze /Login >Dein Passwort<, um dich einzuloggen.");
return 1;
}
PS: ich hab net gesagt dass ich das registersystem selbst gemacht hab nur dass das script selfmade ist