AnimeR_


Wiek: 27 Na forum: 4256 dni Posty: 1
|
|
|
|
Siemka mam taki problem poniewa? nie zapisuj? mi sie Score i kase w mojej rejestracji
Oto m?j kod:
}
if(dialogid == 1)
{
if(response == 0)
{
SendClientMessage(playerid, CZERWONY, "Nie zalogowano = kick");
Kick(playerid);
}
else
{
if(strlen(inputtext) > 0)
{
new stringg[256];
format(stringg, sizeof(stringg), "%s", dini_Get(FileStats(playerid), "HASLO"));
if(!strcmp(inputtext, stringg))
{
SendClientMessage(playerid, ZOLTY, "Zalogowano pomyslnie");
LoadStats(playerid);
}
else
{
SendClientMessage(playerid, 0xff0000ff, "zle haslo");
Kick(playerid);
}
}
else
{
SendClientMessage(playerid, 0xff0000ff, "zle haslo");
Kick(playerid);
}
}
return 1;
}
if(dialogid == 2)
{
new string[256];
if(response == 0)
{
SendClientMessage(playerid, CZERWONY, "Nie wolno gra? bez rejestracji!");
Kick(playerid);
}
else
{
SendClientMessage(playerid,ZOLTY,"Zarejestrowano");
format(string,sizeof(string),"Twoje has?o to: %s",inputtext);
SendClientMessage(playerid,ZOLTY,string);
if (!dini_Exists(FileStats(playerid)))
{
dini_Create(FileStats(playerid));
SaveStats(playerid);
dini_Set(FileStats(playerid),"HASLO",inputtext);
}
}
return 1;
}
return 1;
}
}
FileStats(playerid)
{
new p[256];
format(p, sizeof(p), "%s.ini", udb_encode(Player(playerid)));
return p;
}
SaveStats(playerid)
{
dini_IntSet(FileStats(playerid), "Respekt:", GetPlayerScore(playerid));
dini_IntSet(FileStats(playerid), "Kasa:", GetPlayerMoney(playerid));
}
//==============================================================================
LoadStats(playerid)
{
SetPlayerScore(playerid, dini_Int(FileStats(playerid), "Respekt:"));
SetPlayerMoney(playerid, dini_Int(FileStats(playerid), "Kasa:"));
}
[ Komentarz dodany przez: Sillence: 2014-10-24, 20:56 ]
// Na przysz?o?? u?ywaj tag?w [.code][./code] b?d? [.pawn][./pawn] (Bez Kropek!). Przez to kod staje si? bardziej wyra?ny i ?atwiejszy do odczytania.
|
|