Need to fix a Bug
#1

guys in our server there is a terrible bug
when you type /register which is the main bug all the server crashes!
so can some one fix it for free?
i am gonna add you to /credits as scripter and give you admin level 2 rank
contact me via PM or Skype anonymos_samp

P.S our server is already hosted and in 6 hours about we gonna be on hosted tab!
Код:
CMD:register(playerid,params[])
{
 if(PInfo[playerid][Logged] == 1)
     return SendClientMessage(playerid,COL_GREEN,"» "CWHITE"You are already registered and logged in!");

 new szPassword[24];
 if(sscanf(params,"s[24]",szPassword)) return SendClientMessage(playerid,COL_BLUE,"USAGE: "CWHITE"/register (password)");
 new szPass[24];
 mysql_real_escape_string(szPassword,szPass);

 new PIP[16],TempQuery[450], day, month, year, hour, minute, second;
 GetPlayerIp(playerid,PIP,16);

    getdate(year,month,day);
 gettime(hour,minute,second);
 format(TempQuery, sizeof TempQuery,"INSERT INTO `"Users_Table"` (Username, Password, IP, Money, Score, Level, NitroType, Autofix, Fightstyle, SkinID, SB, AcceptPM, Kills, Deaths, Hours, Mins, Goto, Regged, LastOn) VALUES ('%s', sha1('%s'), '%s', '%i', '%i', '0', '0', '0', '0', '-1', '1', '1', '%i', '%i', '0', '0', '%i', '%02d.%02d.%02d','%02d.%02d.%02d at %02d:%02d:%02d')",
 GetPName(playerid),szPass,PIP,GetPlayerMoney(playerid),GetPlayerScore(playerid), PInfo[playerid][Kills],PInfo[playerid][Deaths],
  PInfo[playerid][GotoToggle], day,month,year,day,month,year,hour,minute,second);

 if(mysql_query(TempQuery))
     SendClientMessage(playerid,COL_GREEN,"You have been successfully registered!"),PlaySound(playerid,1057);
 else
     SendClientMessage(playerid,COL_RED,"Some error occured while registering! Please contact the administrators.");

 PInfo[playerid][Logged] = 1;
 PInfo[playerid][Regged] = 1;
 PInfo[playerid][Skin] = -1;

 GameTextForPlayer(playerid,"~g~~h~You have received: ~n~~r~~h~+$5000 ~n~~r~~h~1000 score",5000,3);
 GivePlayerMoney(playerid,5000);
 SetPlayerScore(playerid,GetPlayerScore(playerid)+1000);

 ShowPlayerDialog(playerid,Emaildialog,1,"Email",""CWHITE"For security reason, we ask you to put in an email so you can recover your password in the future: \n","Accept","No Email");
 return 1;
}
Reply


Messages In This Thread
Need to fix a Bug - by SnipeRz0r - 25.07.2013, 13:46
Re: Need to fix a Bug - by arjanforgames - 25.07.2013, 13:49
Re : Need to fix a Bug - by AmirRFCNR - 25.07.2013, 13:52
Re: Need to fix a Bug - by SnipeRz0r - 25.07.2013, 14:32
Re : Need to fix a Bug - by AmirRFCNR - 25.07.2013, 15:24
Re: Need to fix a Bug - by Binx - 25.07.2013, 15:27
Re : Need to fix a Bug - by AmirRFCNR - 25.07.2013, 15:37
Re: Need to fix a Bug - by SnipeRz0r - 25.07.2013, 15:38
Re: Re : Need to fix a Bug - by Binx - 25.07.2013, 15:40
Re : Need to fix a Bug - by AmirRFCNR - 25.07.2013, 15:42

Forum Jump:


Users browsing this thread: 1 Guest(s)