Help with FS, money reward.
#1

PHP код:
case DIALOG_SETPAIRS:
        {
            
ShowPlayerDialog(playeridDIALOG_SETPAIRS_0DIALOG_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(stringsizeof(string), "\n%s\r\n"inputtext);
               new 
File:pos=fopen("Parovi.txt"io_append);
            
fwrite(posstring);
            
fclose(pos);
            
ShowPlayerDialog(playeridDIALOG_SETPAIRS_1DIALOG_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(playeridnamesizeof(name));
            
format(string1sizeof(string1), "%s"name);
            
format(stringsizeof(string), "%s\r"inputtext);
               new 
File:pos=fopen("Parovi.txt"io_append);
            
fwrite(posstring);
            
fclose(pos);
            
ShowPlayerDialog(playeridDIALOG_SETPAIRS_1DIALOG_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(playerid0"[BBSYS] Kvota za domačina dodana.");
            new 
string[256];
            
format(stringsizeof(string), "%s\r"inputtext);
            new 
File:pos=fopen("Parovi.txt"io_append);
            
fwrite(posstring);
            
fclose(pos);
            }
            
ShowPlayerDialog(playeridDIALOG_SETPAIRS_2DIALOG_STYLE_INPUT"POSTAVLJANJE PAROVA""Unesite ime gosta.\nPrimjer: Sarajevo - Zeljo\nZatim 'postavi par'.","Postavi par.","Nazad.");
            return 
1;
        }
        case 
DIALOG_SETPAIRS_2:
        {
        
ShowPlayerDialog(playeridDIALOG_SETPAIRS_3DIALOG_STYLE_INPUT"POSTAVLJANJE KOEFICIJENATA""Unesite kvota za drugonavedeni tim.\nNaprimjer 3.6 ili 5.1""Unesi.""Izađi.");
            if(
strcmp(inputtext"%s"true))
            {
                
SendClientMessage(playerid0"[BBSYS] Ime gosta dodano.");
            new 
string[256];
            if(!
fexist("Parovi.txt"))
            {
                new 
File:create fopen("Parovi.txt"io_write);
                
fclose(create);
            }
            
format(stringsizeof(string), "%s\r"inputtext);
               new 
File:pos=fopen("Parovi.txt"io_append);
            
fwrite(posstring);
            
fclose(pos);
            }
            return 
1;
        }
        case 
DIALOG_SETPAIRS_3:
        {
        if(
strcmp(inputtext"%s"true))
        {
            
SendClientMessage(playerid0"[BBSYS] Kvota za gosta dodana.");
            new 
string[256];
            
format(stringsizeof(string), "%s \n\n "inputtext);
            new 
File:pos=fopen("Parovi.txt"io_append);
            
fwrite(posstring);
            
fclose(pos);
            }
            
SendClientMessage(playerid0" Sve postavljeno uredu!");
            return 
1;
        } 
This is my script I want to create enum which will after all when player input all informations save that string in enum like string1 and put it into file, and when he add other strings to make new string with name string2 then string3 string4 .
and at the end to say me how to load that strings in DIALOG_STYLE_LIST


HEEEEEEEEEEEEEEEEEEEEEEEEEEEEEELP!
Reply
#2

.................
Reply
#3

.........
Reply
#4

Fixed it for you.

Click here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)