15.10.2012, 21:20
Hi all.. when i choose "Ok" in dialog, my game will restart (bad connecting with the server) and when i connect again, dialog doesnt show for me... i dont understand it
Код:
new path[256];
format(path, sizeof(path), soubor, PlayerConnectName(playerid));
if(fexist(path))
{
SPD(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Prihlaseni", "{FFFFFF}Vнtejte zpбtky na serveru {ffd700}Mafia Roleplay{FFFFFF} přihlaљte se zadбnнm hesla prosнm!\n\nVytvořili:\n{FFFFFF}Pawner a maper: {00ffff}SweetCZ\n{FFFFFF}Testeři: {00ffff}TheTotifus, Ar3st, MiskulunCZ, Skrilex\n{FFFFFF}Webmaster: {00ffff}ManSlayer", "Ok", "Odejit");
}
else
{
SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registrace", "{FFFFFF}Vнtejte na serveru {ffd700}Mafia Roleplay{FFFFFF} zaregistrujte se zadбnнm hesla prosнm!\n\nVytvořili:\n{FFFFFF}Pawner a maper: {00ffff}SweetCZ\n{FFFFFF}Testeři: {00ffff}TheTotifus, Ar3st, MiskulunCZ, Skrilex\n{FFFFFF}Webmaster: {00ffff}ManSlayer", "Ok", "Zavrit");
}
Код:
new path[256];
format(path, sizeof(path), soubor, PlayerConnectName(playerid));
if(dialogid == DIALOG_REGISTER)
{
if(response)
{
new pwlength = strlen(inputtext);
if(pwlength > 0)
{
new string[256];
new File:RegFile = fopen(path, io_write);
if(RegFile)
{
strmid(Information[playerid][Heslo], inputtext, 0, strlen(inputtext), 255);
format(string, sizeof(string), "Heslo=%s", Information[playerid][Heslo]);
fwrite(RegFile, string);
fclose(RegFile);
Information[playerid][NewRegister] = true;
Mafia[playerid][ID] = 0;
Mafia[playerid][Hodnost] = 0;
Mafia[playerid][Sidlo] = 0;
format(MafiaName[Mafia[playerid][ID]],24,"None");
//---------------------------------------------------------
Log(playerid, "Hrac se zaregistroval");
}
}
else
{
SPD(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registrace", "{FFFFFF}Zadejte heslo prosнm!", "Ok", "Zavrit");
}
}
}

