SA-MP Forums Archive
OnDialogResponse - 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: OnDialogResponse (/showthread.php?tid=646814)



OnDialogResponse - maksicnm - 24.12.2017

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == DIALOG_PASS)
    if(!
response) return Kick(playerid);
    if(
response)
    {
        if(
strlen(inputtext) < || strlen(inputtext) > 30) return ShowPlayerDialog(playeridDIALOG_PASSDSI""SRVBOJA"AferaOGC - "BELA"Registracija naloga"""BELA"Vas nalog nije registrovan...\n"BELA"Unesite lozinku za vas nalog u polje dole.\n"BELA"Lozinka NE SME imati "CRVENA"< 6 && > 24 "BELA"karaktera!""Prihvati""Izlaz");
        {
            new 
string2[32];
            
format(string2sizeof(string2), "%s", (inputtext)); 
            new 
string[64];
            
format(stringsizeof(string), ""SRVBOJA"AG-RPG - "BELA"Vasa lozinka: "ZUTA"%s", (inputtext));
            
SCM(playerid, -1string);
            new 
INI:File INI_Open(Korisnici(playerid));
            
INI_SetTag(File,"data");
            
INI_WriteInt(File,"Password"string2); //Error here
            
INI_WriteInt(File,"Novac",0);
            
INI_WriteInt(File,"Zlato",0);
            
INI_WriteInt(File,"Banka",0);
            
INI_WriteInt(File,"Pol",0);
            
INI_WriteInt(File,"Mail",0);
            
INI_WriteInt(File,"God",0);
            
INI_WriteInt(File,"Drzava",0);
            
INI_WriteInt(File,"BorbeniStil",-1);
            
INI_WriteInt(File,"Admin",-1);
            
INI_WriteInt(File,"GameMaster",-1);
            
INI_WriteInt(File,"Vip",0);
            
INI_Close(File);
        }
    }
    return 
1;

Errors:
PHP код:
agrpg.pwn(162) : error 035argument type mismatch (argument 3
btw i DON'T want HASHED pass


Re: OnDialogResponse - maksicnm - 24.12.2017

Fixed by myself.


Re: OnDialogResponse - RogueDrifter - 24.12.2017

change
PHP код:
INI_WriteInt(File,"Password"string2); 
to
PHP код:
INI_WriteString(File,"Password"string2); 
you can't write a string as an integer.
EDIT: eh alright then...


Re: OnDialogResponse - Ritzy2K - 24.12.2017

I hope you're not going to run a public server with a non-hashed password saving. That's messed up man.


Re: OnDialogResponse - maksicnm - 24.12.2017

Yes i will with Non-Hash...
But private VPS


Re: OnDialogResponse - GTLS - 24.12.2017

Its not allowed by SAMP team to run a public server without hashing.

and doesn't matter VPS is private or shared. public server means available for everyone.