GUI

Započeo SARMA, Decembar 08, 2009, 14:22:07 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

nemoj stavljat ovaj dialog, taj obrisi:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
TogglePlayerControllable(playerid, 0);
new pName[24], str[128];
GetPlayerName(playerid,pName,sizeof(pName));
format(str,sizeof(str),"igraci/%s.ini",pName);
if(response == 1)
{
    dini_Create(str);
dini_Set(str,"password",inputtext);
dini_IntSet(str,"cash",500);
dini_IntSet(str,"bank",0);
dini_IntSet(str,"posX",0);
dini_IntSet(str,"posY",0);
dini_IntSet(str,"posZ",0);
SendClientMessage(playerid, 0xFF0000AA, "Sada ste registrirali nadimak.");
TogglePlayerControllable(playerid, 1);
}
if(response == 0)
{
    SendClientMessage(playerid, 0xFFFF0000, "Morate se registirat da bi igrali na serveru.");
Kick(playerid);
}
return 1;
}
if(dialogid ==2)
{
TogglePlayerControllable(playerid, 0);
new pName[24], str[128];
GetPlayerName(playerid, pName, sizeof(pName));
format(str, sizeof(str),"igraci/%s.ini",pName);
new PW[256];
PW = dini_Get(str,"password");
if(response == 1)
{
    if(strval(inputtext) == udb_hash(PW))
    {
        pstat[playerid][skin] = dini_Int(str,"skin");
        pstat[playerid][cash] = dini_Int(str,"cash");
        pstat[playerid][bank] = dini_Int(str,"bank");
        pstat[playerid][posX] = dini_Int(str,"posX");
        pstat[playerid][posY] = dini_Int(str,"posY");
        pstat[playerid][posZ] = dini_Int(str,"posZ");
        GivePlayerMoney(playerid, pstat[playerid][cash]);
        SetPlayerSkin(playerid, pstat[playerid][skin]);
        SetPlayerPos(playerid, pstat[playerid][posX], pstat[playerid][posY], pstat[playerid][posZ]);
}
else
{
    ShowPlayerDialog(playerid, 2, 1,"Kriva lozinka", "Lozinka se ne slaze sa imenom. Pokusajte ponovo.","Login", "Prekini");
}
return 1;
}
}
return 1;
}


Stavi ovaj...stavi ovaj smo...bez onog gore:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
new string[128];
if(response)
{
if(dialogid == 12346 || dialogid == 12347)
{
    if(strlen(inputtext))
    {
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerLogin(playerid,tmppass);
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname));
format(loginstring,sizeof(loginstring),"KRIVA LOZINKA\nMolimo unesite tocnu lozinku:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Izlaz");
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
}
}
if(dialogid == 12345)
{
    if(strlen(inputtext))
    {
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "Ovaj nadimak je vec zauzet, odaberite neki drugi nadimak.");
fclose(hFile);
return 1;
}
new tmppass[64];
strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
else
{
new regstring[128];
new regname[64];
GetPlayerName(playerid,regname,sizeof(regname));
format(regstring,sizeof(regstring),"Dobro dosli, %s\nVi nemate registriran nadimak.\nRegistriraj se:",regname);
ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Registriraj",regstring,"Registriraj","Izlaz");
}
}
}
else
{
Kick(playerid);
}
return 1;
}
Mnogi me znaju, a mnogi misle da znaju.

Sad nema errora samo warninzi ali kad udem u igru dode mi da acc nije regan i ja upisem lozinku i nista nece da se pojavi ono za /login

sad samo za test probaj napravit novi acc...jer mislim da ima malo problema sa ucitavanjem vec registriranih nadimka, tako je kod mene bilo, pa sam se nanovo registrirao i radilo je...a waninge valjda znas rijesti i rijesi ih sto prije...
Mnogi me znaju, a mnogi misle da znaju.

namijesto cega se to stavi?

-.- neznate vi da postoji GUMB "TRAZI" u forumu? eto ti :S

http://balkan-samp.com/forum/index.php?topic=2387.0
Aequam memento rebus in arduis servare mentem.

A ti neznas pogledat kad je ova tema otvorena a kad je taj tut napravljen