register problem

Started by Cool, Apr 23, 2016, 10:15 AM

Previous topic - Next topic

Cool

#60
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

MaTaDeToR

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);
 }

Cool

not working if i try register a unregister player its says you are already registered

Mötley

ADM Script Version: 1.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

Cool

its not the solution to leave my own hand make server and use another
on other hand ADM have same problem which i have

Cool

#65
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

Cool

@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