Hy leute
ich habe es gestern die ganze nacht ausforschen wollen und jetzt ist alles irgend wie aufm kopf..:S
Kann mir einer helfen?
Bitte
dcmd_register(playerid,params[]) {
if (eingeloggt[playerid]) return SendClientMessage(playerid,GRAU,"Du hast berreits einen Account!");
if (udb_Exists(PlayerName(playerid))) return SendClientMessage(playerid,GELB,"Dein Nickname wurde gefunden, Bitte Benutze: /login <Passwort> um dich ein zu loggen.");
if (strlen(params)==0) return SendClientMessage(playerid,GELB,"Benutze: /register <Passwort>");
if (udb_Create(PlayerName(playerid),params)) return SendClientMessage(playerid,GELB,"Dein Passwort wurde gespeichert nun Benutze: /login <Passwort>");
new name[128];
new s[128];
if(!IsPlayerConnected(playerid))
{
GetPlayerName(playerid,name,sizeof(name));
format(s,sizeof s,"%s.ini",playerid(name)); // <--------------- Zeile 4746 wegen dem error weite runten :S
dini_Create(s);
dini_IntSet(s, "Passwort",udb_hash(params));
dini_IntSet(s,"Fuererschein",0);
dini_IntSet(s,"Boot-schein",0);
dini_IntSet(s,"Flug-schein",0);
dini_IntSet(s,"Fuererschein",0);
dini_IntSet(s,"Level",0);
dini_IntSet(s,"Kills",0);
dini_IntSet(s,"deaths",0);
dini_IntSet(s,"Bank",0);
dini_IntSet(s,"Geld",0);
//1958.3783, 1343.1572, 15.3746, 269.1425,
}
return 1;
}
dcmd_login(playerid,params[]) {
if(eingeloggt[playerid]) return SendClientMessage(playerid,GRAU,"Du bist bereits eingeloggt");
if(!strlen(params)) return SendClientMessage(playerid,GELB,"Benutze: /login Passwort");
if (!udb_Exists(PlayerName(playerid))) return SendClientMessage(playerid,GRAU,"Du bist nicht regestriert bitte Benutze: /register <Passwort>");
new s[128];
GetPlayerName(playerid,name,sizeof(name));
/* format(s,sizeof(s),"%s.ini",name);
/*s2=dini_Get(s,"Passwort"); kein plan warum das ich brauch
s2=dini_Get(s,"Bank");
s2=dini_Get(s,"Geld");
s2=dini_Get(s,"Kills");*/
if(dini_Exists(s))
{
// if (udb_CheckLogin(PlayerName(playerid),params)){
format(s,sizeof (s),"%s.ini",playerid(name));
//pInfo[playerid][Pass] = dini_Get(pFile,"Password",udb_hash(params));
//dini_IntSet(pFile, "password",udb_hash(params));
if(udb_hash(params)==strval(dini_Get(s,"Passwort")))
{
pInfo[playerid][pCash] = dini_Int(s,"Geld");
pInfo[playerid][pBank] = dini_Int(s,"Bank");
pInfo[playerid][pKills] = dini_Int(s,"Kills");
pInfo[playerid][pDeaths] = dini_Int(s,"Deaths");
pInfo[playerid][pLevel] = dini_Int(s,"Level");
pInfo[playerid][pMats] = dini_Int(s,"Warns");
pInfo[playerid][carlic] = dini_Int(s,"Fuererschein");
pInfo[playerid][planelic] = dini_Int(s,"Flug-schein");
pInfo[playerid][boatlic] = dini_Float(s,"Boot-schein");
pInfo[playerid][bikelic] = dini_Float(s,"Moto-schein");
/*
if(strval(s2)==udb_hash(params))
{
GivePlayerMoney(playerid,dini_Int(s,"Geld"));
PlayerInfo[playerid][pKills] = dini_Int(s, "Kills");
PlayerInfo[playerid][pBank] = dini_Int(s, "Bank");
}}*/
eingeloggt[playerid] = 1;
new kills = PlayerInfo[playerid][pKills];
SetPlayerScore(playerid, kills);
GivePlayerMoney(playerid,pInfo[playerid][pCash]);
SetPlayerScore(playerid,pInfo[playerid][pLevel]);
new string3[256];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "Willkommen %s, du hast dich erfolgreich eingeloggt! Für Hilfe gib /help ein!", playername3);
SpawnPlayer(playerid);
eingeloggt[playerid]=true;
return SendClientMessage(playerid, WEIS,string3);
}}
}else{
Versuche[playerid]++;
if(Versuche[playerid] == 1) { SendClientMessage(playerid, ROT, "Falsches Passwort noch 2 versuche"); }
else if(Versuche[playerid] == 2){ SendClientMessage(playerid, ROT, "Falsches Passwort letzte chance bevor du gekickt wirst"); }
else if(Versuche[playerid] > 2) { Kick(playerid); }
} return 1; }
bekomme auch noch dieses errors
C:\Users\Hendo\Desktop\SAMP HERZ\gamemodes\Hayfun.pwn(4746) : error 012: invalid function call, not a valid address
C:\Users\Hendo\Desktop\SAMP HERZ\gamemodes\Hayfun.pwn(4746) : warning 215: expression has no effect
C:\Users\Hendo\Desktop\SAMP HERZ\gamemodes\Hayfun.pwn(4746) : error 001: expected token: ";", but found ")"
C:\Users\Hendo\Desktop\SAMP HERZ\gamemodes\Hayfun.pwn(4746) : error 029: invalid expression, assumed zero
C:\Users\Hendo\Desktop\SAMP HERZ\gamemodes\Hayfun.pwn(4746) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.