dcmd_login(playerid,params[])
{
if(pLogged[playerid] == true)
{
SendClientMessage(playerid, ROT,"Du bist schon eingeloggt");
} else {
if(pLogged[playerid] == false)
{
if(AccountExist(playerid))
{
new pFile[128];
format(pFile,sizeof pFile,"acc/%s.ini",Name(playerid));
//pInfo[playerid][Pass] = dini_Get(pFile,"Password",udb_hash(params));
//dini_IntSet(pFile, "password",udb_hash(params));
if(udb_hash(params)!=strval(dini_Get(pFile,"pass")))
{
pInfo[playerid][Admin] = dini_Int(pFile,"Admin");
pInfo[playerid][Score] = dini_Int(pFile,"Score");
pInfo[playerid][Money] = dini_Int(pFile,"Money");
pInfo[playerid][Kills] = dini_Int(pFile,"Kills");
pInfo[playerid][Death] = dini_Int(pFile,"Death");
pInfo[playerid][Warns] = dini_Int(pFile,"Warns");
pInfo[playerid][fahrlehrer2] = dini_Int(pFile,"Fahrlehrer");
pInfo[playerid][Skin] = dini_Int(pFile,"Skin");
pInfo[playerid][spawnx] = dini_Float(pFile,"spawnx");
pInfo[playerid][spawny] = dini_Float(pFile,"spawny");
pInfo[playerid][spawnz] = dini_Float(pFile,"spawnz");
pInfo[playerid][inter] = dini_Int(pFile,"Interrior");
pInfo[playerid][facing] = dini_Float(pFile,"Blickrichtung");
gTeam[playerid] = dini_Int(pFile,"Team");
pInventar[playerid][ddrogen] = dini_Int(pFile, "Drogen");
//GetPlayerHealth(playerid) = dini_Int(pFile, "Health");
//SetPlayerHealth(playerid, GetPlayerHealth(playerid));
GivePlayerMoney(playerid,pInfo[playerid][Money]);
SetPlayerScore(playerid,pInfo[playerid][Score]);
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
SetPlayerPos(playerid,pInfo[playerid][spawnx],pInfo[playerid][spawny],pInfo[playerid][spawnz]);
SetPlayerFacingAngle(playerid,pInfo[playerid][facing]);
SetPlayerInterior(playerid,pInfo[playerid][inter]);
eingeloggt[playerid]=1;
pLogged[playerid] = true;
}
else
{
SendClientMessage(playerid,0xFF0000FF,"Falsches Passwort!");
}
}
}
}
return 1;
}
dcmd_register(playerid, params[])
{
if(!AccountExist(playerid))
{
new pFile[128];
format(pFile,sizeof pFile,"acc/%s.ini",Name(playerid));
dini_Create(pFile);
dini_IntSet(pFile, "pass",udb_hash(params));
dini_IntSet(pFile,"Admin",0);
dini_IntSet(pFile,"Fahrlehrer",0);
dini_IntSet(pFile,"Score",0);
dini_IntSet(pFile,"Money",50000);
dini_IntSet(pFile,"Kills",0);
dini_IntSet(pFile,"Warns",0);
dini_IntSet(pFile,"Death",0);
dini_IntSet(pFile,"Skin",0);
dini_IntSet(pFile,"A",0);
dini_IntSet(pFile,"B",0);
dini_IntSet(pFile,"C",0);
dini_IntSet(pFile,"H",0);
dini_IntSet(pFile,"S",0);
dini_IntSet(pFile,"Team",4);
dini_FloatSet(pFile,"spawnx",1958.3783);
dini_FloatSet(pFile,"spawny",1343.1572);
dini_FloatSet(pFile,"spawnz",15.3746);
dini_IntSet(pFile,"Interrior",0);
dini_FloatSet(pFile,"Blickrichtung",269.1425);
dini_IntSet(pFile,"Drogen",0);
/*dini_IntSet(pFile,"Waffe1",0);
dini_IntSet(pFile,"Waffe2",0);
dini_IntSet(pFile,"Waffe3",0);
dini_IntSet(pFile,"Ammo1",0);
dini_IntSet(pFile,"Ammo2",0);
dini_IntSet(pFile,"Ammo3",0);*/
//dini_IntSet(pFile,"Health",100);
//1958.3783, 1343.1572, 15.3746, 269.1425,
SendClientMessage(playerid,0xFF0000FF,"[Erfolgreich Regestriert]");
SendClientMessage(playerid, 0xffffff, " Bitte einloggen: /login [Password]");
}
return 1;
}
Jemand was erkennen?