Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Cool on Apr 23, 2016, 10:15 AM

Title: register problem
Post by: Cool on Apr 23, 2016, 10:15 AM
one name player can be register twice time and its add double time in db
its problem due to lower alphabets and bigger if a player registered with bangash he can register again with BANGASH
constructor( playerName, dbGlobal ){
local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name='" + playerName + "' AND NameLower='" + playerName.tolower() + "'" );
if( ::GetSQLColumnData( query, 5 ) ){
Cash = ::GetSQLColumnData( query, 0 );
Bank = ::GetSQLColumnData( query, 1 );
Kills = ::GetSQLColumnData( query, 2 );
Deaths = ::GetSQLColumnData( query, 3 );
Level = ::GetSQLColumnData( query, 4 );
LastUsedIP = ::GetSQLColumnData( query, 5 );
}
::FreeSQLQuery( query );
}

function Join( player ){
if( Level == 0 ){
::MessagePlayer("[#FF0000][TIP][#FFFFFF]   Please Register To Play.", player );
::MessagePlayer( "[#FF0000][INFO][#FFFFFF]Register with /register <password>", player );
}
else if( LastUsedIP == player.IP ){
Logged = true;
::MessagePlayer( "[#FF0000] [SERVER] [#FFFFFF]Welcome back !", player );
::MessagePlayer( "[#FF0000] [SERVER] [#FFFFFF]You have been auto logged in server !", player );
}
else{
::MessagePlayer( "[#FF0000] [Tip] [#FFFFFF]Please login to play.", player );
::MessagePlayer( "[#FF0000] [INFO] [#FFFFFF]Login with /login <password>", player );
}
}

function Update( player, dbGlobal ){
::QuerySQL( dbGlobal, "UPDATE Accounts SET Cash=" + Cash + ", Bank=" + Bank + ", Kills=" + Kills + ", Deaths=" + Deaths + ", Level=" + Level + ", LastUsedIP='" + LastUsedIP + ", nogoto='" + nogoto + "' WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
}

function Register( player, password, dbGlobal ){
::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "', '" + 0 + "')" );
Level = 1;
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Successfully registered.", player );
::MessagePlayer( "[#FF0000] [Tip] [#FFFFFF]Don't forget your password. [" + password + "]", player );
}


function Login( player, password, dbGlobal ){
local query = ::QuerySQL( dbGlobal, "SELECT Password FROM Accounts WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
if( ::GetSQLColumnData( query, 0 ) == null ){
::MessagePlayer( "[#FF0000][TIP] [#FFFFFF] You are not registered Register With /register pass.", player );
}
else if( ::SHA256( password ) != ::GetSQLColumnData( query, 0 ) ){
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Wrong password.", player );
}
else{
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Successfully logged in.", player );
}
}
}
Title: Re: register prob
Post by: . on Apr 23, 2016, 10:22 AM
I'm sorry but what does 'prob' mean? Does it stand for 'problem'? If so, then spell the whole f*ing name because no one will be able to search for similar issues if you f*tards can't spell correctly.
Title: Re: register problem
Post by: Cool on Apr 23, 2016, 10:29 AM
thanks for telling me my mistake
Title: Re: register problem
Post by: KAKAN on Apr 23, 2016, 11:13 AM
Quote from: . on Apr 23, 2016, 10:22 AMI'm sorry but what does 'prob' mean? Does it stand for 'problem'? If so, then spell the whole f*ing name because no one will be able to search for similar issues if you f*tards can't spell correctly.
Quote from: Hercules on Apr 23, 2016, 10:29 AMthanks for telling me my mistake
You're welcome lol
For 'you', the 'fix' to your 'problem' is:
Remove the NAME from the queries and only use/keep the NameLower :D
Title: Re: register problem
Post by: Cool on Apr 23, 2016, 11:18 AM
 [EDIT]I try but bugging my script as you know w i am exprience less local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name='"+NameLower='" + playerName.tolower() + "'" );

Title: Re: register problem
Post by: KAKAN on Apr 23, 2016, 11:53 AM
Use this:
local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE NameLower='" + playerName.tolower() + "'" );
Title: Re: register problem
Post by: Cool on Apr 23, 2016, 11:56 AM
@KAKAN love you
problem solved
Title: Re: register problem
Post by: Cool on Apr 24, 2016, 07:41 PM
At that time problem is solved but now occurring again please help
Title: Re: register problem
Post by: KAKAN on Apr 25, 2016, 06:41 AM
Quote from: Hercules on Apr 24, 2016, 07:41 PMAt that time problem is solved but now occurring again please help
What's the error?

Quote from: Hercules on Apr 23, 2016, 11:56 AM@KAKAN love you
gay
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 08:38 AM
its problem due to lower alphabets and bigger if a player registered with bangash he can register again with BANGASH
Quote from: Hercules on Apr 23, 2016, 11:56 AM@KAKAN love you
gay
[/quote]
NOT gay lol
Title: Re: register problem
Post by: Coolkid on Apr 25, 2016, 11:05 AM
Can you show you function onPlayer Join

local query = ::QuerySQL( dbGlobal, "SELECT Password FROM Accounts WHERE Name LIKE '" + player.Name + "' '" )

Try this note I am on mobile so thee might be mistake

LIKE works as same way as player.Name.tolower
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 11:12 AM
function onPlayerJoin( player ){
NewTimer("Banned", 3000, 1, player.ID );
NewTimer("Jailed", 3000, 1, player.ID );

local country = geoip_country_name_by_addr(player.IP);
    if (country != null) // the plugin returned a meaningful result
        Message("* " + player.Name + " is connecting from " + country + ". [" + geoip_country_code_by_addr(player.IP) + "]");


pstats[ player.ID ] = PlayerClass( player.Name, sqliteDB );
 pstats[ player.ID ].Join( player );
 AddUser( player );
 menuJoin( player );
 tuneJoin( player );
 if(timer_status == false)
                {
                        timer_status = true;
                        meter.Paused = false;
                        print("Timer Resumed");
NewTimer("sendmsgs", 100000, 0 );

                }
}
Title: Re: register problem
Post by: Coolkid on Apr 25, 2016, 11:14 AM
Did you tried local query = ::QuerySQL( dbGlobal, "SELECT Password FROM Accounts WHERE Name LIKE '" + player.Name + "' '" )
Title: Re: register problem
Post by: Coolkid on Apr 25, 2016, 11:20 AM
Try this also local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name LIKE '" + playerName+ "'" );
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 02:16 PM
now not showing that i am not registered but when i try to login its shows you are not registered with us and i can register again  @KAKAN  HELP
Title: Re: register problem
Post by: KAKAN on Apr 25, 2016, 04:23 PM
Quote from: Hercules on Apr 25, 2016, 02:16 PMnow not showing that i am not registered but when i try to login its shows you are not registered with us and i can register again  @KAKAN  HELP
Try this instead:
local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE NameLower='" + playerName+ "'" );
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 04:39 PM
ITS NOT WORKING showing you are not register did you ever face this problem
Title: Re: register problem
Post by: Pumak47 on Apr 25, 2016, 06:16 PM
try this

i change this line: ::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "', '" + 0 + "')" );

function Register( player, password, dbGlobal ) {
  ::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "', 0 )" );
  Level = 1;
  LastUsedIP = player.IP;
  Logged = true;
  ::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Successfully registered.", player );
  ::MessagePlayer( "[#FF0000] [Tip] [#FFFFFF]Don't forget your password. [" + password + "]", player );
 }
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 06:30 PM
not works
Title: Re: register problem
Post by: Coolkid on Apr 25, 2016, 06:49 PM
The thing I have you what was error with that

Is your register details being saved in database
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 06:53 PM
yes saved
Title: Re: register problem
Post by: Pumak47 on Apr 25, 2016, 06:55 PM
what's ur problem then?
Title: Re: register problem
Post by: Cool on Apr 25, 2016, 07:14 PM
its problem due to lower alphabets and bigger if a player registered with bangash he can register again with BANGASH
Title: Re: register problem
Post by: Mötley on Apr 25, 2016, 09:42 PM
Is your browser in the correct order as what is required?

Screen shots are liked!!
hopefully with a registered player
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 10:51 AM
hi i am with a interest news i tested cf official clan same problem to his but i think his owner doesent know test your servers
EDIT: checked army vs terrorists server same problem in this server which owner is @Mashreq
@KAKAN
another checked grand theif auto european city has same same problem which owner Human
Title: Re: register problem
Post by: Coolkid on Apr 26, 2016, 10:58 AM
Check boss killers kingdom
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 11:02 AM
no its fine but at this i auto logged may be next time when i not aautologged its say you are not registered when i try to login
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 11:14 AM
@sseebbyy  please can you help me in this problem please get me out of there
Title: Re: register problem
Post by: Sebastian on Apr 26, 2016, 11:25 AM
Quote from: Hercules on Apr 26, 2016, 11:14 AM@sseebbyy  please can you help me in this problem please get me out of there

You need no tagging/forcing for getting help. Persons who are interested in your problem will simply reply.
What @KAKAN said makes sense: use name-to-lower instead of Name.
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 12:05 PM
already dided and sorry
but not working
Title: Re: register problem
Post by: KAKAN on Apr 26, 2016, 12:51 PM
Quote from: Hercules on Apr 26, 2016, 10:51 AMhi i am with a interest news i tested cf official clan same problem to his but i think his owner doesent know test your servers
EDIT: checked army vs terrorists server same problem in this server which owner is @Mashreq
@KAKAN
another checked grand theif auto european city has same same problem which owner Human
Well, they made it because they liked it. Not everyone likes to use NameLower.
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 01:00 PM
its have no solution should i lock this topic
Title: Re: register problem
Post by: DizzasTeR on Apr 26, 2016, 01:14 PM
There is a solution to everything, you just can't do shit.
Title: Re: register problem
Post by: Coolkid on Apr 26, 2016, 01:50 PM
I don't want to be harsh here but I have to

We can't baby sit anymore hwre now this is the easiest prb to be. Solved as you said like 1 week before you server is ready and no one is giving you host this is reason why drake is not giving host you don't know scripting
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 02:03 PM
@Coolkid minimum you dont say you cant solve it its not easy how much you understand
Doom please tell me what i do if you know
And Drake says he cant support my server name
Title: Re: register problem
Post by: Coolkid on Apr 26, 2016, 02:33 PM
@Hercules I have also added player name to lower and normal letters it is pretty easy job if you don't do anything wrong this is very simple
Title: Re: register problem
Post by: Pumak47 on Apr 26, 2016, 03:24 PM
erase your old system and put it again!!!

Clicky (http://forum.vc-mp.org/?topic=224.msg1162#msg1162)

Title: Re: register problem
Post by: DizzasTeR on Apr 26, 2016, 04:34 PM
Show me your login command.
Title: Re: register problem
Post by: Cool on Apr 26, 2016, 04:51 PM
if( cmd == "register" ){
if( !text ){
MessagePlayer(WHITE+"Syntax Error!", player );
MessagePlayer(RED+"[SYNTAX]"+WHITE+" /register <password>", player );
}
else if( pstats[ player.ID ].Logged == true ){
MessagePlayer( "You are already logged in.", player );
}
else{
pstats[ player.ID ].Register( player, text, sqliteDB );
}
Title: Re: register problem
Post by: DizzasTeR on Apr 26, 2016, 05:01 PM
Damn, my bad, you can edit your previous post, and remove login command, I meant to say your register command.
Title: Re: register problem
Post by: MaTaDeToR on Apr 26, 2016, 05:05 PM
Quote from: Doom_Kill3R on Apr 26, 2016, 05:01 PMDamn, my bad, you can edit your previous post, and remove login command, I meant to say your register command.
As far as i thought! we can surely disable it through the command by using, so called COLLATE NOCASE, I hope you got me.
i.e : if ( cmd == "register" )
{
                 local q = QuerySQL( Your_DATABASE, "SELECT * FROM TABLE_NAME WHERE HINT = '" + player.Name + "' COLLATE NOCASE" );
if (  !GetSQLColumnData( q, 0 ) )
                       {
           //Rest of your Functions.
       
}
 else  ClientMessage("Error:You Are Already Registered"player,255,255,0);
}
Title: Re: register problem
Post by: Mötley on Apr 26, 2016, 05:12 PM
This is a register problem, not a login problem.

if( cmd == "register" ){
if( !text ){
MessagePlayer( "Syntax Error!", player );
MessagePlayer( "Correct syntax: /register <password>", player );
}
else if( pstats[ player.ID ].Logged == true ){
MessagePlayer( "You are already logged in.", player );
}
else{
pstats[ player.ID ].Register( player, text, sqliteDB );
}
}

If this is not your issue then once again Upload an image of a registered player in your browser.
Title: Re: register problem
Post by: MaTaDeToR on Apr 26, 2016, 05:29 PM
Quote from: Mr_Motley on Apr 26, 2016, 05:12 PMThis is a register problem, not a login problem.

if( cmd == "register" ){
if( !text ){
MessagePlayer( "Syntax Error!", player );
MessagePlayer( "Correct syntax: /register <password>", player );
}
else if( pstats[ player.ID ].Logged == true ){
MessagePlayer( "You are already logged in.", player );
}
else{
pstats[ player.ID ].Register( player, text, sqliteDB );
}
}

If this is not your issue then once again Upload an image of a registered player in your browser.
if ( cmd =="register")
{
  local q = QuerySQL( DATABASE_NAME, "SELECT * FROM TABLE_NAME WHERE HINT = '" + player.Name + "' COLLATE NOCASE" );
if (  !GetSQLColumnData( q, 0 ) )
                       {
                           if ( text )
                               {
                                 if (  pstats[ player.ID ].Logged == false )
                                  {
                                   pstats[ player.ID ].Register( player, text, sqliteDB );
                          }
               else ClientMessage("You are already logged in",player,255,255,0);
          }
      else ClientMessage("/" + Cmd + " <_Password>",player,255,255,0);
 }
else ClientMessage("Error:You Are Already Registered"player,255,255,0);
}
Well, it was that simple i guess now he just have to compile his script according to this.
Title: Re: register problem
Post by: KAKAN on Apr 26, 2016, 05:34 PM
No, according to FAS, the fixed register command should be:
if( cmd == "register" ){
  if( !text ){
   MessagePlayer( "Syntax Error!", player );
   MessagePlayer( "Correct syntax: /register <password>", player );
  }
  else if( pstats[ player.ID ].Logged == true ) MessagePlayer( "You are already logged in.", player );
  else if( pstats[ player.ID ].Level > 0 ) MessagePlayer( "You're already registered.", player );
  else pstats[ player.ID ].Register( player, text, sqliteDB );
 }
Title: Re: register problem
Post by: Coolkid on Apr 26, 2016, 06:39 PM
Quote from: KAKAN on Apr 26, 2016, 05:34 PMNo, according to FAS, the fixed register command should be:
if( cmd == "register" ){
  if( !text ){
   MessagePlayer( "Syntax Error!", player );
   MessagePlayer( "Correct syntax: /register <password>", player );
  }
  else if( pstats[ player.ID ].Logged == true ) MessagePlayer( "You are already logged in.", player );
  else if( pstats[ player.ID ].Level > 0 ) MessagePlayer( "You're already registered.", player );
  else pstats[ player.ID ].Register( player, text, sqliteDB );
 }

Hercules can you show your register function
Title: Re: register problem
Post by: Milos on Apr 26, 2016, 08:01 PM
constructor( playerName, dbGlobal ){
  local query = ::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name='" + playerName + "' COLLATE NOCASE" );
  if( ::GetSQLColumnData( query, 5 ) ){
   Cash = ::GetSQLColumnData( query, 0 );
   Bank = ::GetSQLColumnData( query, 1 );
   Kills = ::GetSQLColumnData( query, 2 );
   Deaths = ::GetSQLColumnData( query, 3 );
   Level = ::GetSQLColumnData( query, 4 );
   LastUsedIP = ::GetSQLColumnData( query, 5 );
  }
  ::FreeSQLQuery( query );
 }

::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name='" + playerName + "' AND NameLower='" + playerName.tolower() + "'" );to
::QuerySQL( dbGlobal, "SELECT Cash, Bank, Kills, Deaths, Level, LastUsedIP, nogoto FROM Accounts WHERE Name='" + playerName + "' COLLATE NOCASE" );
Title: Re: register problem
Post by: Mötley on Apr 26, 2016, 08:02 PM
If any of this does not work Once again we need pictures of your Browser( with a registered player) also include your create table.
Title: Re: register problem
Post by: Milos on Apr 26, 2016, 08:06 PM
Quote from: Mr_Motley on Apr 26, 2016, 08:02 PMIf any of this does not work Once again we need pictures of your Browser( with a registered player) also include your create table.
I believe that now work. I had the same problem, and that was my solution.
Now the server checks Necrose and necrose and loads the stats for any of these nicks :).

Title: Re: register problem
Post by: Mötley on Apr 26, 2016, 08:09 PM
I have made a small mistake and had my create table values off a little as well (added to much at once) in the browser causing issues upon registering and logging in, That is the only reason why I said that
Title: Re: register problem
Post by: DizzasTeR on Apr 27, 2016, 05:15 AM
What are all these messy replies? The problem is in his register command and KAKAN's conmand which he posted will work pretty well.
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 10:41 AM
doom its now shows you registered please login
but while logging its says me you are not registered i think problem is in login cmd and function and take a look on function update and register maybe a mistake here
else if( cmd == "login" ){
if( !text ){
MessagePlayer( "Syntax Error!", player );
MessagePlayer( "Correct syntax: /login <password>", player );
}
else if( pstats[ player.ID ].Logged == true ){
MessagePlayer( "You are already logged in.", player );
}
else{
pstats[ player.ID ].Login( player, text, sqliteDB );
}

function Login( player, password, dbGlobal ){
local query = ::QuerySQL( dbGlobal, "SELECT Password FROM Accounts WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
if( ::GetSQLColumnData( query, 0 ) == null ){
::MessagePlayer( "[#FF0000][TIP] [#FFFFFF] You are not registered Register With /register pass.", player );
}
else if( ::SHA256( password ) != ::GetSQLColumnData( query, 0 ) ){
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Wrong password.", player );
}
else{
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Successfully logged in.", player );
}

function Update( player, dbGlobal ){
::QuerySQL( dbGlobal, "UPDATE Accounts SET Cash=" + Cash + ", Bank=" + Bank + ", Kills=" + Kills + ", Deaths=" + Deaths + ", Level=" + Level + ", LastUsedIP='" + LastUsedIP + ", nogoto='" + nogoto + "' WHERE Name='" + player.Name + "' AND NameLower='" + player.Name.tolower() + "'" );
}

function Register( player, password, dbGlobal ){
::QuerySQL( dbGlobal, "INSERT INTO Accounts VALUES('" + player.Name + "', '" + player.Name.tolower() + "', '" + ::SHA256( password ) + "', 0, 0, 0, 0, 1, '" + player.IP + "', '" + 0 + "')" );
Level = 1;
LastUsedIP = player.IP;
Logged = true;
::MessagePlayer( "[#FF0000] [Info] [#FFFFFF]Successfully registered.", player );
::MessagePlayer( "[#FF0000] [Tip] [#FFFFFF]Don't forget your password. [" + password + "]", player );
}
Title: Re: register problem
Post by: DizzasTeR on Apr 27, 2016, 11:19 AM
For fuck sake dude, if you want help, then atleast follow the instructions given to you, I've told you to give me your register command, if you're so sure about the error, where and why is it occurring then fix it yourself.
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 11:59 AM
you say me modify your post in which i post login cmd when you say me by mistake give me login cmds i updated my that post with register
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 12:00 PM
Quote from: Hercules on Apr 26, 2016, 04:51 PMif( cmd == "register" ){
if( !text ){
MessagePlayer(WHITE+"Syntax Error!", player );
MessagePlayer(RED+"[SYNTAX]"+WHITE+" /register <password>", player );
}
else if( pstats[ player.ID ].Logged == true ){
MessagePlayer( "You are already logged in.", player );
}
else{
pstats[ player.ID ].Register( player, text, sqliteDB );
}
Title: Re: register problem
Post by: DizzasTeR on Apr 27, 2016, 12:56 PM
if( cmd == "register" )
{
    if( !text )
    {
        MessagePlayer(WHITE+"Syntax Error!", player );
        MessagePlayer(RED+"[SYNTAX]"+WHITE+" /register <password>", player );
    }
    else if( pstats[ player.ID ].Logged == true )
    {
        MessagePlayer( "You are already logged in.", player );
    }
    else
     {
        local szName = player.Name, szNameLower = player.Name.tolower(), sqlQuery = mysql_query( sqLiteDB, "SELECT Level FROM Accounts WHERE Name='" + szName + "' AND NameLower='" + szNameLower + "'" );
        if( mysql_num_rows( sqlQuery ) == 1 ) MessagePlayer( "You are already registered.", player );
        else
        {
            pstats[ player.ID ].Register( player, params[0], params[1], sqLiteDB );
        }
        mysql_free_result( sqlQuery );
    }
}
Title: Re: register problem
Post by: Coolkid on Apr 27, 2016, 12:59 PM
Quote from: Doom_Kill3R on Apr 27, 2016, 12:56 PMif( cmd == "register" )
{
    if( !text )
    {
        MessagePlayer(WHITE+"Syntax Error!", player );
        MessagePlayer(RED+"[SYNTAX]"+WHITE+" /register <password>", player );
    }
    else if( pstats[ player.ID ].Logged == true )
    {
        MessagePlayer( "You are already logged in.", player );
    }
    else
     {
        local szName = player.Name, szNameLower = player.Name.tolower(), sqlQuery = mysql_query( sqLiteDB, "SELECT Level FROM Accounts WHERE Name='" + szName + "' AND NameLower='" + szNameLower + "'" );
        if( mysql_num_rows( sqlQuery ) == 1 ) MessagePlayer( "You are already registered.", player );
        else
        {
            pstats[ player.ID ].Register( player, params[0], params[1], sqLiteDB );
        }
        mysql_free_result( sqlQuery );
    }
}

Test it now
Title: Re: register problem
Post by: Mötley on Apr 27, 2016, 01:52 PM
This now sounds like a hashing issue(I could be wrong).
what hashing are you using are they both the same ?
example: your login is MD5 then the register is whirlpool
It needs to be one or the other not two different ones, double check this, also Doom_Kill3R only posting similar issues and other stuff in case he happened to have the same issues. I still feel like this is also possibly a database table issue
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 02:18 PM
(https://forum.vc-mp.org/proxy.php?request=http%3A%2F%2Fi63.tinypic.com%2F23sc40i.png&hash=11b7e2dd9c8306f1c646ae4aaace75f4322176cc)
Title: Re: register problem
Post by: Thijn on Apr 27, 2016, 02:30 PM
As you can see from the LOCALS, sqlQuery is false. Which means your query fails. It's syntax is invalid or your mysql isn't actually connected.
Title: Re: register problem
Post by: KAKAN on Apr 27, 2016, 02:31 PM
Quote from: Thijn on Apr 27, 2016, 02:30 PMyour mysql isn't actually connected.
He's asking with SQLite, so it's shit to think about MySQL :D
Well, @Hercules, scroll up and try the register command which I posted.
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 03:13 PM
Quote from: KAKAN on Apr 26, 2016, 05:34 PMNo, according to FAS, the fixed register command should be:
if( cmd == "register" ){
  if( !text ){
   MessagePlayer( "Syntax Error!", player );
   MessagePlayer( "Correct syntax: /register <password>", player );
  }
  else if( pstats[ player.ID ].Logged == true ) MessagePlayer( "You are already logged in.", player );
  else if( pstats[ player.ID ].Level > 0 ) MessagePlayer( "You're already registered.", player );
  else pstats[ player.ID ].Register( player, text, sqliteDB );
 }
is that i try it but not works
Title: Re: register problem
Post by: MaTaDeToR on Apr 27, 2016, 06:52 PM
Quote from: Hercules on Apr 27, 2016, 03:13 PM
Quote from: KAKAN on Apr 26, 2016, 05:34 PMNo, according to FAS, the fixed register command should be:
if( cmd == "register" ){
  if( !text ){
   MessagePlayer( "Syntax Error!", player );
   MessagePlayer( "Correct syntax: /register <password>", player );
  }
  else if( pstats[ player.ID ].Logged == true ) MessagePlayer( "You are already logged in.", player );
  else if( pstats[ player.ID ].Level > 0 ) MessagePlayer( "You're already registered.", player );
  else pstats[ player.ID ].Register( player, text, sqliteDB );
 }
is that i try it but not works
if( cmd == "register" ){
  if( text )
         {
       if( pstats[ player.ID ].Logged == false )
          {
    local q = QuerySQL( dbGlobal, "SELECT Name FROM Accounts WHERE Name = '" + player.Name + "' COLLATE NOCASE" );
           if (  GetSQLColumnData( q, 0 ) )
                       { 
                   pstats[ player.ID ].Register( player, text, sqliteDB );
                  }
                      else ClientMessage("Error:You Are Already Registered"player,255,255,0);
                           }
            else ClientMessage("You are already logged in",player,255,255,0);
         }
  else ClientMessage("/" + Cmd + " <_Password>",player,255,255,0);
 }
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 07:15 PM
not working if i try register a unregister player its says you are already registered
Title: Re: register problem
Post by: Mötley on Apr 27, 2016, 08:41 PM
ADM Script Version: 1.0
Clicky (http://forum.vc-mp.org/?topic=332.0)


You are Wasting your time and its not needed for something so simple. Please consider moving on to a Pre built accounting server

Kind Regards
~Motley
Title: Re: register problem
Post by: Cool on Apr 27, 2016, 09:02 PM
its not the solution to leave my own hand make server and use another
on other hand ADM have same problem which i have
Title: Re: register problem
Post by: Cool on Apr 28, 2016, 08:06 AM
thanks to all but problem is still not solved and going lock the topic if anyone find any solution tell me in pm i will unlock it
Title: Re: register problem
Post by: Cool on Apr 28, 2016, 02:16 PM
@MaTaDeToR
Thanks you solved my problem solution is which he give me in pm
Quote from: MaTaDeToR on Apr 28, 2016, 09:46 AMif( cmd == "register" ){
  if( text )
         {
       if( pstats[ player.ID ].Logged == false )
          {
    local q = QuerySQL( dbGlobal, "SELECT Name FROM Accounts WHERE Name = '" + player.Name + "' COLLATE NOCASE" );
           if ( !GetSQLColumnData( q, 0 ) )
                       { 
                   pstats[ player.ID ].Register( player, text, sqliteDB );
                  }
                      else ClientMessage("Error:You Are Already Registered"player,255,255,0);
                           }
            else ClientMessage("You are already logged in",player,255,255,0);
         }
  else ClientMessage("/" + Cmd + " <_Password>",player,255,255,0);
 }
I just did a mistake over, and try this one! i can bet this one is going to Work, reply back if it work's.
[mergedate]1461839416[/mergedate]
@Coolkid you are posting an useless things thats why not working and saying me baby sit lol