Szerző Téma: Nem menti a pontot  (Megtekintve 463 alkalommal)

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Nem menti a pontot
« Dátum: 2012. Augusztus 14. - 18:08:01 »
0 Show voters
Üdv, az lenne a problémám hogy az admin rendszer nem menti a pontokat se a pénzt
Kilépésnél mentés:
 

public OnPlayerDisconnect(playerid, reason)
{
format(file,128,\"AFS/%s.ini\",na(playerid));
    if(fexist(file))
    {
      dini_IntSet(file,\"Admin\",GetPVarInt(playerid,\"Admin\"));
dini_IntSet(file,\"Money\",GetPlayerMoney(playerid));
dini_IntSet(file,\"Kill\",infoka[playerid][Kill]);
dini_IntSet(file,\"Halal\",infoka[playerid][Death]);
dini_IntSet(file,\"Score\",GetPlayerScore(playerid));
dini_IntSet(file,\"ban\",infoka[playerid][ban]);
dini_IntSet(file,\"FavSkin\",GetPVarInt(playerid,\"FavSkin\"));
dini_IntSet(file,\"Bank\",GetPVarInt(playerid,\"Bank\"));
}
return 1;
}
 

 
Regisztráció/Bejelentkezés
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{      format(file,128,\"AFS/%s.ini\",na(playerid));
if(dialogid == 500 )
{
if(response)
{
    if(strlen(inputtext) == 0)
     {
    ShowPlayerDialog(playerid, 500, DIALOG_STYLE_INPUT, \"Regisztráció\", \"Írj be egy jelszót:\", \"Regisztráció\", \"Mégse.\");
    return 0;
    }
if(!fexist(file))
{
dini_Create(file);
dini_IntSet(file,\"Pass\",udb_hash(inputtext));
dini_IntSet(file,\"Admin\",0);
dini_IntSet(file,\"Money\",0);
dini_IntSet(file,\"Kill\",0);
dini_IntSet(file,\"Halal\",0);
dini_IntSet(file,\"Score\",0);
dini_IntSet(file,\"ban\",0);
dini_IntSet(file,\"FavSkin\",GetPVarInt(playerid,\"FavSkin\"));
dini_IntSet(file,\"Bank\",GetPVarInt(playerid,\"Bank\"));
    ShowPlayerDialog(playerid, 501, DIALOG_STYLE_PASSWORD, \"Bejelentkezés\", \"Írd be a jelszavad\", \"Belép\", \"Mégse.\");
    }
    }
    }
    if(dialogid == 501)
    {
      if(response)
{
    if(strlen(inputtext) == 0)
    {
    ShowPlayerDialog(playerid, 501, DIALOG_STYLE_INPUT, \"Bejelentkezés\", \"Írd be a jelszavad:\", \"Belép\", \"Mégse.\");
    return 0;
    }
if(fexist(file))
{
new password = dini_Int(file,\"Pass\");
if(udb_hash(inputtext) != password)
{
SendClientMessage(playerid,COLOR_RED,\"  A  beírt jelszavad helytelen ezért kickelve lettél;)\");
Kick(playerid);
}
else
{
SetPVarInt(playerid,\"Admin\",dini_Int(file,\"Admin\"));
GivePlayerMoney(playerid,dini_Int(file,\"Money\"));
SetPVarInt(playerid,\"Kill\",dini_Int(file,\"Kill\"));
SetPVarInt(playerid,\"Death\",dini_Int(file,\"Death\"));
SetPlayerScore(playerid,dini_Int(file,\"Score\"));
SetPVarInt(playerid,\"FavSkin\",dini_Int(file,\"FavSkin\"));
SetPVarInt(playerid,\"Bank\",dini_Int(file,\"Bank\"));
SendClientMessage(playerid,COLOR_GREEN,\"Sikeresen bejelentkeztél!\");
if(infoka[playerid][ban] == 1)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,\"Bannolva vagy a szerverrõl kérj unbannt az afsszerver.sunwell.hu oldalon!\");
Kick(playerid);
GameTextForPlayer(playerid,\"Banned\",2500,2);
}
}
}
}
}
return 1;
}

Nem elérhető ZyZu.

  • Globális moderátor
  • 8939
  • my turbo diesel forum
  • Discord: ZyZu.
    • Profil megtekintése
Nem menti a pontot
« Válasz #1 Dátum: 2012. Augusztus 14. - 18:32:46 »
0 Show voters
OnPlayerConnect Része? :D

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Nem menti a pontot
« Válasz #2 Dátum: 2012. Augusztus 14. - 18:43:05 »
0 Show voters
minek az?
ott a reg/login dialog van meg a fájl elérési utja a többi már más tészta.

Nem elérhető CsiG4

  • 208
    • Profil megtekintése
Nem menti a pontot
« Válasz #3 Dátum: 2012. Augusztus 14. - 18:49:00 »
0 Show voters
Lehet hülyeséget mondok, nem értek én annyira ehhez, de a connectnél olvassa be a mentéseket nem ?

Nem elérhető instant

  • 2778
  • ZzzzzZ
    • Profil megtekintése
Nem menti a pontot
« Válasz #4 Dátum: 2012. Augusztus 14. - 18:51:57 »
0 Show voters
nem , ott a dialogja van ha kell bemásolom

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal