SA-MP Forums Archive
Dialog and Enum Compatability - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog and Enum Compatability (/showthread.php?tid=469071)



Dialog and Enum Compatability - lramos15 - 11.10.2013

So I made a bunch of dialogs to a create a faction command but it doesn't save them to the enum I wanted does anyone know how to fix this. Here are the Dialogs. Here is the enum
PHP код:
enum fInfo
{
    
fName[100],
    
factionid,
    
rank1[100],
    
rank2[100],
    
rank3[100],
    
rank4[100],
    
rank5[100],
    
rank6[100],
    
rank7[100],
    
rank8[100],
    
rank9[100],
    
rank10[100],
    
skinidrank1,
    
skinidrank2,
    
skinidrank3,
    
skinidrank4,
    
skinidrank5,
    
skinidrank6,
    
skinidrank7,
    
skinidrank8,
    
skinidrank9,
    
skinidrank10
}
new 
FactionInfo[MAX_FACTION][fInfo]; 



Re: Dialog and Enum Compatability - edzis84 - 11.10.2013

Ohh, well thats cuz there are no enums involved in your script.

To save your enums you have to add all those things on - OnPlayerDisconnect callback, you can read some tutorials about saving and loading systems.

And of course you have to give a value or index (dunno how to say that) to your enums, for example

Код:
 if(dialogid == 13) {
            if(!response) return 1;
                if(response)
                    {
                           FactionInfo[playerid][factionid] = 1;
                    }
          }
Sorry for idents.

Maybe i understood you wrong, there is second version.

change
Код:
INI_WriteString(File,"Rank2",inputtext);
to
Код:
INI_WriteString(File," FactionInfo[playerid][Rank2]",inputtext);



Re: Dialog and Enum Compatability - lramos15 - 11.10.2013

Im still confused mind giving me an example within my script?


Re: Dialog and Enum Compatability - lramos15 - 12.10.2013

The code you gave me to change it to doesn't work it just writes FactionInfo[playerid][Rank2] = what I typed.