10.07.2014, 14:12
PHP код:
case DIALOG_SETPAIRS:
{
ShowPlayerDialog(playerid, DIALOG_SETPAIRS_0, DIALOG_STYLE_INPUT, "POSTAVLJANJE PAROVA", "Unesite ime domačina.\nPrimjer: Sarajevo, Real..\nZatim 'postavi par'.","Postavi par.","Nazad.");
if(strcmp(inputtext, "%s", true))
{
SendClientMessage(playerid,0, "[BBSYS] Ime domačina dodano.");
new string[256];
if(!fexist("Parovi.txt"))
{
new File:create = fopen("Parovi.txt", io_write);
fclose(create);
}
format(string, sizeof(string), "\n%s\r\n", inputtext);
new File:pos=fopen("Parovi.txt", io_append);
fwrite(pos, string);
fclose(pos);
ShowPlayerDialog(playerid, DIALOG_SETPAIRS_1, DIALOG_STYLE_INPUT, "POSTAVLJANJE KOEFICIJENATA", "Unesite kvotu za prvonavedeni tim.\nNaprimjer: 1.4", "Unesi.", "Izađi.");
}
}
case DIALOG_SETPAIRS_0:
{
if(strcmp(inputtext, "%s", true))
{
SendClientMessage(playerid,0, "[BBSYS] Ime domačina dodano.");
new string[256];
if(!fexist("Parovi.txt"))
{
new File:create = fopen("Parovi.txt", io_write);
fclose(create);
}
new name[MAX_PLAYER_NAME+1], string1[24+MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string1, sizeof(string1), "%s", name);
format(string, sizeof(string), "%s\r", inputtext);
new File:pos=fopen("Parovi.txt", io_append);
fwrite(pos, string);
fclose(pos);
ShowPlayerDialog(playerid, DIALOG_SETPAIRS_1, DIALOG_STYLE_INPUT, "POSTAVLJANJE KOEFICIJENATA", "Unesite kvotu za prvonavedeni tim.\nNaprimjer: 1.4", "Unesi.", "Izađi.");
}
}
case DIALOG_SETPAIRS_1:
{
if(strcmp(inputtext, "%s", true))
{
SendClientMessage(playerid, 0, "[BBSYS] Kvota za domačina dodana.");
new string[256];
format(string, sizeof(string), "%s\r", inputtext);
new File:pos=fopen("Parovi.txt", io_append);
fwrite(pos, string);
fclose(pos);
}
ShowPlayerDialog(playerid, DIALOG_SETPAIRS_2, DIALOG_STYLE_INPUT, "POSTAVLJANJE PAROVA", "Unesite ime gosta.\nPrimjer: Sarajevo - Zeljo\nZatim 'postavi par'.","Postavi par.","Nazad.");
return 1;
}
case DIALOG_SETPAIRS_2:
{
ShowPlayerDialog(playerid, DIALOG_SETPAIRS_3, DIALOG_STYLE_INPUT, "POSTAVLJANJE KOEFICIJENATA", "Unesite kvota za drugonavedeni tim.\nNaprimjer 3.6 ili 5.1", "Unesi.", "Izađi.");
if(strcmp(inputtext, "%s", true))
{
SendClientMessage(playerid, 0, "[BBSYS] Ime gosta dodano.");
new string[256];
if(!fexist("Parovi.txt"))
{
new File:create = fopen("Parovi.txt", io_write);
fclose(create);
}
format(string, sizeof(string), "%s\r", inputtext);
new File:pos=fopen("Parovi.txt", io_append);
fwrite(pos, string);
fclose(pos);
}
return 1;
}
case DIALOG_SETPAIRS_3:
{
if(strcmp(inputtext, "%s", true))
{
SendClientMessage(playerid, 0, "[BBSYS] Kvota za gosta dodana.");
new string[256];
format(string, sizeof(string), "%s \n\n ", inputtext);
new File:pos=fopen("Parovi.txt", io_append);
fwrite(pos, string);
fclose(pos);
}
SendClientMessage(playerid, 0, " Sve postavljeno uredu!");
return 1;
}
and at the end to say me how to load that strings in DIALOG_STYLE_LIST
HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!