SA-MP Forums Archive
[Tutorial] Login and Register System - Dialogs - Using SII - 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)
+---- Forum: Tutorials (https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] Login and Register System - Dialogs - Using SII (/showthread.php?tid=267808)

Pages: 1 2


AW: Re: AW: Login and Register System - Dialogs - Using SII - samtey - 20.07.2011

Quote:
Originally Posted by Shockey HD
View Post
Very top of script, and the stock goes anywhere, other than that. Good tutorial Kush
Where is anywhere? Step 6 before the includes?


Re: Login and Register System - Dialogs - Using SII - System64 - 20.07.2011

pawn Code:
#include <a_samp>
#include <SII>

#define DIALOG_REGISTER 2000
#define DIALOG_LOGIN 2001
#define WHITE "{FFFFFF}"
#define RED "{F81414}"
#define GREEN "{00FF22}"
#define LIGHTBLUE "{00CED1}"
new gPlayerName[MAX_PLAYERS][MAX_PLAYER_NAME];

#define TEAM_GROVE 1
#define TEAM_BALLA 2
#define TEAM_VAGOS 3
#define TEAM_GROVE_COLOR 0x00FF00AA // Bright Green (in RGBA format)
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow
new gTeam[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

enum pInfo
{
    pPass,
    pScore,
    pCash,
    pAdmin,
}
new PlayerInfo[MAX_PLAYERS][pInfo];



stock getINI(playerid)
{
  new account[64];
  format(account,30,"Users/%s.ini",gPlayerName[playerid]);
  return account;
}



AW: Login and Register System - Dialogs - Using SII - samtey - 20.07.2011

Ehm, thanks, but would you please say what you changed?


AW: Login and Register System - Dialogs - Using SII - samtey - 20.07.2011

Lol, another error, what's wrong this time?
Code:
deathmatch.pwn(256) : warning 217: loose indentation
Code:
public OnPlayerDisconnect(playerid, reason)
{

if(INI_Open(getINI(playerid))) {

    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);

    INI_Save();
    INI_Close();
    }
    return 1; // what the hell is wrong here?
}



Re: Login and Register System - Dialogs - Using SII - System64 - 20.07.2011

It means that your line aren't adjusted
pawn Code:
public OnPlayerDisconnect(playerid, reason)
{
    if(INI_Open(getINI(playerid)))
    {
    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);
    INI_Save();
    INI_Close();
    }
    return 1;
}



Re: Login and Register System - Dialogs - Using SII - Kush - 20.07.2011

I've never expected you to receive so many errors. The tutorial explains each of the functions in depth and their uses.


Re: AW: Login and Register System - Dialogs - Using SII - Shockey HD - 22.07.2011

Quote:
Originally Posted by samtey
View Post
Lol, another error, what's wrong this time?
Code:
deathmatch.pwn(256) : warning 217: loose indentation
Code:
public OnPlayerDisconnect(playerid, reason)
{

if(INI_Open(getINI(playerid))) {

    INI_WriteInt("Score",PlayerInfo[playerid][pScore]);
    INI_WriteInt("Cash",PlayerInfo[playerid][pCash]);
    INI_WriteInt("Admin",PlayerInfo[playerid][pAdmin]);

    INI_Save();
    INI_Close();
    }
    return 1; // what the hell is wrong here?
}
Many (knowledge people who take time in Pawno) knows exactly what that means. Spend a little time learning what the Warning's mean and what the Errors mean. Also, if your really lazy, you can use TidyPawn


Re: Login and Register System - Dialogs - Using SII - Mustafa6155 - 10.10.2012

Kush please help it works but i have sii and yini but... if i register its an fail ini users/name no works not saves the names


Re: Login and Register System - Dialogs - Using SII - danilonba - 23.10.2012

nice.


Re: Login and Register System - Dialogs - Using SII - burnfire - 17.04.2013

This tutorial is nice!But I have an problem.When I type corect password in Login Dialog,it say:"The password is wrong"message!Can you help me?


Re: Login and Register System - Dialogs - Using SII - Player23 - 28.06.2013

Why my Kills Score Death etc is not saving after logout and come again?


Re: Login and Register System - Dialogs - Using SII - Hardy - 28.06.2013

Thank you!


Re: Login and Register System - Dialogs - Using SII - Akira297 - 02.07.2013

By far the most beautiful tutorial I have ever read.


Re: Login and Register System - Dialogs - Using SII - AntmanCow - 02.07.2013

Thank you for your help!