Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: :P on Sep 17, 2015, 01:09 PM

Title: register problem
Post by: :P on Sep 17, 2015, 01:09 PM
once i register saying register again no console error
function
function Register( player, password )
{
     try{
local pass = e(password);
QuerySQL( db, "INSERT INTO Account ( Name, IP, Level, Pass, Kills, Deaths, Cash, Bank, Joins, nogoto, DateRegistered, WonLMS, RandSpawn ) VALUES ( '" + player.Name.tolower() + "', '" + player.IP + "', 1, '" + pass + "', 0, 0, 0, 0, 0, 'off', '" + GetFullTime() + "', 0, 'on' )" );
QuerySQL( db, "REPLACE INTO Bstats ( Name, User, Body, Torso, LeftArm, RightArm, LeftLeg, RightLeg, Head ) VALUES ( '" + player.Name.tolower() + "', '" + player.Name + "', 0, 0, 0, 0, 0, 0, 0 )" );
     QuerySQL( db, "REPLACE INTO Wstats ( Name, User, Fist, BrassKnuckle, ScrewDriver, GolfClub, NightStick, Knife, BaseballBat, Hammer, Cleaver, Machete, Katana, Chainsaw, Grenade, RemoteGrenade, TearGas, Molotov, Missile, Colt45, Python, Shotgun, Spaz , Stubby, Tec9, Uzi, Ingrams, MP5, M4, Ruger, SniperRifle, LaserScope, RocketLauncher, FlameThrower, M60 ) VALUES ( '" + player.Name.tolower() + "', '" + player.Name + "', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 )" );
IncCash( player, 2000 );
status[ player.ID ].IsLogged = true;
status[ player.ID ].IsReg = true;
ePrivMessage( "You've Registered!", player );
ePrivMessage( "Nick:[ " + player.Name + " ] Password:[ " + password + " ]", player );
rMessage( ">> " + player.Name + " is successfully registered with us" );
                   Message( "[#00ff00][Achievement]: [#FF0000]" + player.Name + " Has unlocked an achievement: [#00FFFF][Experiencing test]." );
}
catch(e) print( "Reg Function Error: " + e );

}
cmds
if ( cmd == "register" )
  {
   if ( status[ player.ID ].IsReg == true ) ePrivMessage( "[Error] - You're Already Registered!", player );
   else if ( !text ) ePrivMessage( "[Syntax] - / " + cmd + " <Password>", player );
   else
   {
        Register( player, text );
}
  }
Title: Re: register problem
Post by: Mashreq on Sep 17, 2015, 01:30 PM
Are you sure that your account is inserted into database when you register?
Show us your onPlayerJoin event.
Title: Re: register problem
Post by: :P on Sep 17, 2015, 01:31 PM
function onPlayerJoin( player )
{
local country = IpToCountry( player.IP );
        Message( "[#ff033e][JOIN]: [#00FFFF]"+player.Name+" Has joined WORLD WARS from [#06FA16]"+country+"[#F5FFFA]." );
local IP = player.IP;
    Message("*[#00cc99] " + player.Name + " is connecting the server");
draw.ShowForPlayer(player);
s<-CreateSprite("image.jpg",580,360,0,0,0,255);
s.ShowForAll ();
CreateMarker(player.UniqueWorld, Vector( -10.4317, -213.3678, 10.1507 ), 5, RGB(0, 0, 0), 101 );
CreateMarker(player.UniqueWorld, Vector( -1686.2292, -29.0471, 7.5577 ), 5, RGB(0, 0, 0), 116 );
CreateMarker(player.UniqueWorld, Vector( -436.8255, 1239.9253, 10.0365 ), 5, RGB(0, 0, 0), 117 );
MessagePlayer("[#0000ff]Your Unique ID is [#ff00ff]"+player.UniqueID,player);
MessagePlayer("[#e32636]***==========[#76ff7a]Welcome To The Server[#e32636]==========***",player);
  MessagePlayer("[#ff033e][GREETINGS][#ed9121]:[#df00ff]We welcome you to [#ed9121]WORLD WARS ,[#df00ff] A world of its own",player);
                    MessagePlayer("[#ff033e][INFORMATION][#ed9121]:[#df00ff]Be sure to type [#ed9121]/rules, /info [#df00ff]& [#ed9121]/cmds [#df00ff]before playing " player );
MessagePlayer("[#990000]===========[#fffafa]"+ player.Name + ", IP: " + player.IP +"[#990000]=============" player );
                  MessagePlayer("[#fffafa]/Register [#990000]& [#fffafa]/login [#990000]before playing" player );
EchoMessage(ICOL_LBLUE +"* " + player.Name + " has joined the server.");

status[ player.ID ] = PlayerStats( player.Name);
LastActive(player);
       AccInfo( player );
}
Title: Re: register problem
Post by: KAKAN on Sep 17, 2015, 02:10 PM
Maybe this is the wrong one:-
Changelocal pass = e(password);To:-local pass = SHA256(password)And make sure you have the plugins installed
Title: Re: register problem
Post by: KAKAN on Sep 17, 2015, 02:12 PM
Quote from: Mashreq on Sep 17, 2015, 01:30 PMAre you sure that your account is inserted into database when you register?
Show us your onPlayerJoin event.
mashreq, As u can see, he's not using any kind of arrays to register, He's calling a function
Title: Re: register problem
Post by: Drake on Sep 17, 2015, 02:50 PM
@xxkillerxx Maybe you should stop using my bugged leaked script.
Title: Re: register problem
Post by: FinchDon on Sep 17, 2015, 03:14 PM
I know That fault happen to me too when i change Register Function of Fuzzie Account system it say register again and again Problem is in Db or Message
Title: Re: register problem
Post by: KAKAN on Sep 17, 2015, 04:18 PM
LOL, you guys don't know how to use his system :P, Wait I'll release his system bug free version soon
Title: Re: register problem
Post by: DizzasTeR on Sep 17, 2015, 05:03 PM
Quote from: KAKAN on Sep 17, 2015, 04:18 PMLOL, you guys don't know how to use his system :P, Wait I'll release his system bug free version soon

For the sake of your no IQ level, Fuzzie's account system is not bugged, is it that hard for all of you to even copy and paste some code? if so then stop right now to whatever you are trying to implement.

Releasing a 'bug free' version of something which is not bugged at the first place makes no sense, I've been using his system for quite a long time both SQLite based and MySQL based, and I never had any re-registering issues as long as you don't setup stuff correctly.
Title: Re: register problem
Post by: KAKAN on Sep 17, 2015, 05:18 PM
Quote from: Doom_Killer on Sep 17, 2015, 05:03 PM
Quote from: KAKAN on Sep 17, 2015, 04:18 PMLOL, you guys don't know how to use his system :P, Wait I'll release his system bug free version soon

For the sake of your no IQ level, Fuzzie's account system is not bugged, is it that hard for all of you to even copy and paste some code? if so then stop right now to whatever you are trying to implement.

Releasing a 'bug free' version of something which is not bugged at the first place makes no sense, I've been using his system for quite a long time both SQLite based and MySQL based, and I never had any re-registering issues as long as you don't setup stuff correctly.
Okay then!
Title: Re: register problem
Post by: :P on Sep 18, 2015, 04:16 AM
thanks drake i didnt its leaked script my friend give me and hes say i made it for my self but i give you soryyyyyyyyy   topic locked no use of bugged and leak script