Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new string[256],query[256],escpass[256],PIP[56],LastLogin[128];
new Hour, Minute, Second, Year, Month, Day;
GetPlayerIp(playerid, PIP, sizeof(PIP)); //Gets the players IP
gettime(Hour, Minute, Second);
getdate(Year, Month, Day);
format(LastLogin, sizeof(LastLogin), "DATE: %d-%d-%d TIME: %d:%d",Day,Month,Year,Hour,Minute);
if(dialogid == DIALOG_REGISTER)
{
if(response == 1)
{
if(!strlen(inputtext)) //If the player doesn't enter a pass
{
format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
return 1;
}
if(strlen(inputtext) < 6)
{
SendClientMessage(playerid, COLOR_ERROR, "Your Password is Too Short, Enter a Longer Password.");
format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
return 1;
}
if(strlen(inputtext) > 12)
{
SendClientMessage(playerid, COLOR_ERROR, "Your Password is Too Long, Enter a Shorter Password.");
format(string, sizeof(string), "Cops And Robbers\n \nNew Registration - Name: %s\n \nDo Not Register Multiple Accounts\nDo Not Use The Same Password That You Use Elsewhere\nMinimum 6 Chars Maximum 12 Chars\n \nPlease Enter A Password For Your Account:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT , "CnR Registration",string, "Register", "Cancel");
return 1;
}
mysql_real_escape_string(inputtext, escpass);
//mysql_real_escape_string(PlayerInfo[playerid][pName],PlayerInfo[playerid][pName]);
//mysql_real_escape_string(inputtext,inputtext);
format(query, sizeof(query), "INSERT INTO playerdata (UserName, Password, IP) VALUES('%s', SHA1('%s'), '%s')", PlayerInfo[playerid][pName], escpass, PIP);
mysql_query(query);
//format(query, sizeof(query), "INSERT INTO playerdata (UserName, Password, IP) VALUES ('%s', md5('%s'), '%s')",PlayerInfo[playerid][pName], inputtext, PIP); //Insert string
//mysql_query(query);
format(query,sizeof(query),"UPDATE playerdata SET Registered = '%s' WHERE (UserName = '%s')",LastLogin,PlayerInfo[playerid][pName]);
mysql_query(query); //queries
format(query,sizeof(query),"UPDATE playerdata SET LastLogin = '%s' WHERE (UserName = '%s')",LastLogin,PlayerInfo[playerid][pName]);
mysql_query(query); //queries
mysql_free_result();
PlayerInfo[playerid][pLogged] = 1;
PlayerInfo[playerid][pRegistered] = 1;
//SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "Registered And Logged In.");
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "New Account Created. Your Are Now Logged In. ");//Please Read The Registration Info.
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "Type /help and /commands For Game Information, or visit "WEBSITE"");
}else{//End Of Response Check
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FFFFFF}Registration {FF0000}Cancelled.");
}
}//End Of DialogCheck
if(dialogid == DIALOG_LOGIN)
{
if(response == 1)
{
mysql_real_escape_string(inputtext, escpass); //We escape the inputtext to avoid SQL injections.
format(query, sizeof(query), "SELECT * FROM playerdata WHERE UserName = '%s' AND Password = SHA1('%s')", PlayerInfo[playerid][pName], escpass);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
new wdata[256],Locked;
format(query,sizeof(query),"SELECT * FROM playerdata WHERE UserName = '%s' LIMIT 1",PlayerInfo[playerid][pName]);
mysql_query(query);
mysql_store_result();
while(mysql_retrieve_row()) //it will be running until there are no more rows to be retrieved
{
mysql_get_field("Locked",wdata); //macro for mysql_fetch_field_row
Locked = strval(wdata);
if (Locked > 0)KickPlayer(playerid,"Server","ACCOUNT DISABLED","This Account Is Disabled");
mysql_get_field("AdminLevel",wdata);
PlayerInfo[playerid][pAdminLevel] = strval(wdata);
mysql_get_field("LoginTimes",wdata);
PlayerInfo[playerid][pLoginTimes] = strval(wdata);
mysql_get_field("ConnHour",wdata);
PlayerInfo[playerid][pConnHour] = strval(wdata);
mysql_get_field("ConnMinute",wdata);
PlayerInfo[playerid][pConnMinute] = strval(wdata);
mysql_get_field("Tutorial",wdata);
PlayerInfo[playerid][pTutorial] = strval(wdata);
mysql_get_field("Regular",wdata);
PlayerInfo[playerid][pRegular] = strval(wdata);
mysql_get_field("Donator",wdata);
PlayerInfo[playerid][pDonator] = strval(wdata);
mysql_get_field("Score",wdata);
PlayerInfo[playerid][pScore] = strval(wdata);
switch (CURRENT_GAMEMODE)
{
case LOS_SANTOS:
{
mysql_get_field("LsResume",wdata);
PlayerInfo[playerid][pResume] = strval(wdata);
mysql_get_field("LsClass",wdata);
PlayerInfo[playerid][pClass] = strval(wdata);
mysql_get_field("LsTeam",wdata);
PlayerInfo[playerid][pTeam] = strval(wdata);
mysql_get_field("LsSkill",wdata);
PlayerInfo[playerid][pSkill] = strval(wdata);
mysql_get_field("LsLevel",wdata);
PlayerInfo[playerid][pLevel] = strval(wdata);
mysql_get_field("LsRank",wdata);
PlayerInfo[playerid][pRank] = strval(wdata);
mysql_get_field("LsMoney",wdata);
PlayerInfo[playerid][pMoney] = strval(wdata);
mysql_get_field("LsFakeSkill",wdata);
PlayerInfo[playerid][pFakeSkill] = strval(wdata);
mysql_get_field("LsGender",wdata);
PlayerInfo[playerid][pGender] = strval(wdata);
mysql_get_field("LsHealth",wdata);
PlayerInfo[playerid][pHealth] = strval(wdata);
mysql_get_field("LsArmour",wdata);
PlayerInfo[playerid][pArmour] = strval(wdata);
mysql_get_field("LsWeapon1",wdata);
PlayerInfo[playerid][pWeapon][1] = strval(wdata);
mysql_get_field("LsAmmo1",wdata);
PlayerInfo[playerid][pAmmo][1] = strval(wdata);
mysql_get_field("LsWeapon2",wdata);
PlayerInfo[playerid][pWeapon][2] = strval(wdata);
mysql_get_field("LsAmmo2",wdata);
PlayerInfo[playerid][pAmmo][2] = strval(wdata);
mysql_get_field("LsWeapon3",wdata);
PlayerInfo[playerid][pWeapon][3] = strval(wdata);
mysql_get_field("LsAmmo3",wdata);
PlayerInfo[playerid][pAmmo][3] = strval(wdata);
mysql_get_field("LsWeapon4",wdata);
PlayerInfo[playerid][pWeapon][4] = strval(wdata);
mysql_get_field("LsAmmo4",wdata);
PlayerInfo[playerid][pAmmo][4] = strval(wdata);
mysql_get_field("LsWeapon5",wdata);
PlayerInfo[playerid][pWeapon][5] = strval(wdata);
mysql_get_field("LsAmmo5",wdata);
PlayerInfo[playerid][pAmmo][5] = strval(wdata);
mysql_get_field("LsWeapon6",wdata);
PlayerInfo[playerid][pWeapon][6] = strval(wdata);
mysql_get_field("LsAmmo6",wdata);
PlayerInfo[playerid][pAmmo][6] = strval(wdata);
mysql_get_field("LsWeapon7",wdata);
PlayerInfo[playerid][pWeapon][7] = strval(wdata);
mysql_get_field("LsAmmo7",wdata);
PlayerInfo[playerid][pAmmo][7] = strval(wdata);
mysql_get_field("LsWeapon8",wdata);
PlayerInfo[playerid][pWeapon][8] = strval(wdata);
mysql_get_field("LsAmmo8",wdata);
PlayerInfo[playerid][pAmmo][8] = strval(wdata);
mysql_get_field("LsWeapon9",wdata);
PlayerInfo[playerid][pWeapon][9] = strval(wdata);
mysql_get_field("LsAmmo9",wdata);
PlayerInfo[playerid][pAmmo][9] = strval(wdata);
mysql_get_field("LsWeapon10",wdata);
PlayerInfo[playerid][pWeapon][10] = strval(wdata);
mysql_get_field("LsAmmo10",wdata);
PlayerInfo[playerid][pAmmo][10] = strval(wdata);
mysql_get_field("LsWeapon11",wdata);
PlayerInfo[playerid][pWeapon][11] = strval(wdata);
mysql_get_field("LsAmmo11",wdata);
PlayerInfo[playerid][pAmmo][11] = strval(wdata);
mysql_get_field("LsWeapon12",wdata);
PlayerInfo[playerid][pWeapon][12] = strval(wdata);
mysql_get_field("LsAmmo12",wdata);
PlayerInfo[playerid][pAmmo][12] = strval(wdata);
mysql_get_field("LsCondom",wdata);
PlayerInfo[playerid][pCondom] = strval(wdata);
mysql_get_field("LsStd1",wdata);
PlayerInfo[playerid][pStd][1] = strval(wdata);
mysql_get_field("LsStd2",wdata);
PlayerInfo[playerid][pStd][2] = strval(wdata);
mysql_get_field("LsStd3",wdata);
PlayerInfo[playerid][pStd][3] = strval(wdata);
mysql_get_field("LsStd4",wdata);
PlayerInfo[playerid][pStd][4] = strval(wdata);
mysql_get_field("LsChastity",wdata);
PlayerInfo[playerid][pChastity] = strval(wdata);
mysql_get_field("LsFightStyle",wdata);
PlayerInfo[playerid][pFightStyle] = strval(wdata);
mysql_get_field("LsAdrenaline",wdata);
PlayerInfo[playerid][pAdrenaline] = strval(wdata);
mysql_get_field("LsEarnings",wdata);
PlayerInfo[playerid][pEarnings] = strval(wdata);
mysql_get_field("LsBank",wdata);
PlayerInfo[playerid][pBank] = strval(wdata);
mysql_get_field("LsInterest",wdata);
PlayerInfo[playerid][pInterest] = strval(wdata);
mysql_get_field("LsTaxes",wdata);
PlayerInfo[playerid][pTaxes] = strval(wdata);
mysql_get_field("LsDebt",wdata);
PlayerInfo[playerid][pDebt] = strval(wdata);
mysql_get_field("LsLifeInsurance",wdata);
PlayerInfo[playerid][pLifeInsurance] = strval(wdata);
mysql_get_field("LsHealthInsurance",wdata);
PlayerInfo[playerid][pHealthInsurance] = strval(wdata);
mysql_get_field("LsBankInsurance",wdata);
PlayerInfo[playerid][pBankInsurance] = strval(wdata);
mysql_get_field("LsWantedLevel",wdata);
PlayerInfo[playerid][pWantedLevel] = strval(wdata);
mysql_get_field("LsDaysAlive",wdata);
PlayerInfo[playerid][pDaysAlive] = strval(wdata);
mysql_get_field("LsDrugs",wdata);
PlayerInfo[playerid][pDrugs] = strval(wdata);
mysql_get_field("LsDeaths",wdata);
PlayerInfo[playerid][pDeaths] = strval(wdata);
mysql_get_field("LsKills",wdata);
PlayerInfo[playerid][pKills] = strval(wdata);
mysql_get_field("LsHeals",wdata);
PlayerInfo[playerid][pHeals] = strval(wdata);
mysql_get_field("LsHealed",wdata);
PlayerInfo[playerid][pHealed] = strval(wdata);
mysql_get_field("LsVehiclesStolen",wdata);
PlayerInfo[playerid][pVehiclesStolen] = strval(wdata);
mysql_get_field("LsVehiclesSold",wdata);
PlayerInfo[playerid][pVehiclesSold] = strval(wdata);
mysql_get_field("LsCrimesCommitted",wdata);
PlayerInfo[playerid][pCrimesCommitted] = strval(wdata);
mysql_get_field("LsTicketsReceived",wdata);
PlayerInfo[playerid][pTicketsReceived] = strval(wdata);
mysql_get_field("LsTicketsPaid",wdata);
PlayerInfo[playerid][pTicketsPaid] = strval(wdata);
mysql_get_field("LsTicketsIssued",wdata);
PlayerInfo[playerid][pTicketsIssued] = strval(wdata);
mysql_get_field("LsTicketsCollected",wdata);
PlayerInfo[playerid][pTicketsCollected] = strval(wdata);
mysql_get_field("LsArrested",wdata);
PlayerInfo[playerid][pArrested] = strval(wdata);
mysql_get_field("LsReported",wdata);
PlayerInfo[playerid][pReported] = strval(wdata);
mysql_get_field("LsArrests",wdata);
PlayerInfo[playerid][pArrests] = strval(wdata);
mysql_get_field("LsReports",wdata);
PlayerInfo[playerid][pReports] = strval(wdata);
mysql_get_field("LsHitsReceived",wdata);
PlayerInfo[playerid][pHitsReceived] = strval(wdata);
mysql_get_field("LsHitsPlaced",wdata);
PlayerInfo[playerid][pHitsPlaced] = strval(wdata);
mysql_get_field("LsRapes",wdata);
PlayerInfo[playerid][pRapes] = strval(wdata);
mysql_get_field("LsRaped",wdata);
PlayerInfo[playerid][pRaped] = strval(wdata);
mysql_get_field("LsRobberies",wdata);
PlayerInfo[playerid][pRobberies] = strval(wdata);
mysql_get_field("LsRobbed",wdata);
PlayerInfo[playerid][pRobbed] = strval(wdata);
mysql_get_field("LsBail",wdata);
PlayerInfo[playerid][pBail] = strval(wdata);
mysql_get_field("LsJailVisits",wdata);
PlayerInfo[playerid][pJailVisits] = strval(wdata);
mysql_get_field("LsJailed",wdata);
PlayerInfo[playerid][pJailed] = strval(wdata);
mysql_get_field("LsJailHour",wdata);
PlayerInfo[playerid][pJailHour] = strval(wdata);
mysql_get_field("LsJailMinute",wdata);
PlayerInfo[playerid][pJailMinute] = strval(wdata);
mysql_get_field("LsHouse",wdata);
PlayerInfo[playerid][pHouse] = strval(wdata);
mysql_get_field("LsCar",wdata);
PlayerInfo[playerid][pCar] = strval(wdata);
mysql_get_field("LsGunLic",wdata);
PlayerInfo[playerid][pGunLic] = strval(wdata);
mysql_get_field("LsMenu_Items",wdata);
Menu_Items[playerid] = strval(wdata);
mysql_get_field("LsMenu_ItemName1",wdata);
strmid(Menu_ItemName[playerid][1], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName2",wdata);
strmid(Menu_ItemName[playerid][2], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName3",wdata);
strmid(Menu_ItemName[playerid][3], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName4",wdata);
strmid(Menu_ItemName[playerid][4], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName5",wdata);
strmid(Menu_ItemName[playerid][5], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName6",wdata);
strmid(Menu_ItemName[playerid][6], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName7",wdata);
strmid(Menu_ItemName[playerid][7], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName8",wdata);
strmid(Menu_ItemName[playerid][8], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName9",wdata);
strmid(Menu_ItemName[playerid][9], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemName10",wdata);
strmid(Menu_ItemName[playerid][10], wdata, 0, strlen(wdata), 256);
mysql_get_field("LsMenu_ItemPrice1",wdata);
Menu_ItemPrice[playerid][1] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice2",wdata);
Menu_ItemPrice[playerid][2] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice3",wdata);
Menu_ItemPrice[playerid][3] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice4",wdata);
Menu_ItemPrice[playerid][4] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice5",wdata);
Menu_ItemPrice[playerid][5] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice6",wdata);
Menu_ItemPrice[playerid][6] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice7",wdata);
Menu_ItemPrice[playerid][7] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice8",wdata);
Menu_ItemPrice[playerid][8] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice9",wdata);
Menu_ItemPrice[playerid][9] = strval(wdata);
mysql_get_field("LsMenu_ItemPrice10",wdata);
Menu_ItemPrice[playerid][10] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice1",wdata);
Menu_ItemMinPrice[playerid][1] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice2",wdata);
Menu_ItemMinPrice[playerid][2] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice3",wdata);
Menu_ItemMinPrice[playerid][3] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice4",wdata);
Menu_ItemMinPrice[playerid][4] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice5",wdata);
Menu_ItemMinPrice[playerid][5] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice6",wdata);
Menu_ItemMinPrice[playerid][6] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice7",wdata);
Menu_ItemMinPrice[playerid][7] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice8",wdata);
Menu_ItemMinPrice[playerid][8] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice9",wdata);
Menu_ItemMinPrice[playerid][9] = strval(wdata);
mysql_get_field("LsMenu_ItemMinPrice10",wdata);
Menu_ItemMinPrice[playerid][10] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice1",wdata);
Menu_ItemMaxPrice[playerid][1] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice2",wdata);
Menu_ItemMaxPrice[playerid][2] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice3",wdata);
Menu_ItemMaxPrice[playerid][3] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice4",wdata);
Menu_ItemMaxPrice[playerid][4] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice5",wdata);
Menu_ItemMaxPrice[playerid][5] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice6",wdata);
Menu_ItemMaxPrice[playerid][6] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice7",wdata);
Menu_ItemMaxPrice[playerid][7] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice8",wdata);
Menu_ItemMaxPrice[playerid][8] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice9",wdata);
Menu_ItemMaxPrice[playerid][9] = strval(wdata);
mysql_get_field("LsMenu_ItemMaxPrice10",wdata);
Menu_ItemMaxPrice[playerid][10] = strval(wdata);
}
case LAS_VENTURAS:
{
mysql_get_field("LvResume",wdata);
PlayerInfo[playerid][pResume] = strval(wdata);
mysql_get_field("LvClass",wdata);
PlayerInfo[playerid][pClass] = strval(wdata);
mysql_get_field("LvTeam",wdata);
PlayerInfo[playerid][pTeam] = strval(wdata);
mysql_get_field("LvSkill",wdata);
PlayerInfo[playerid][pSkill] = strval(wdata);
mysql_get_field("LvLevel",wdata);
PlayerInfo[playerid][pLevel] = strval(wdata);
mysql_get_field("LvRank",wdata);
PlayerInfo[playerid][pRank] = strval(wdata);
mysql_get_field("LvMoney",wdata);
PlayerInfo[playerid][pMoney] = strval(wdata);
mysql_get_field("LvFakeSkill",wdata);
PlayerInfo[playerid][pFakeSkill] = strval(wdata);
mysql_get_field("LvGender",wdata);
PlayerInfo[playerid][pGender] = strval(wdata);
mysql_get_field("LvHealth",wdata);
PlayerInfo[playerid][pHealth] = strval(wdata);
mysql_get_field("LvArmour",wdata);
PlayerInfo[playerid][pArmour] = strval(wdata);
mysql_get_field("LvWeapon1",wdata);
PlayerInfo[playerid][pWeapon][1] = strval(wdata);
mysql_get_field("LvAmmo1",wdata);
PlayerInfo[playerid][pAmmo][1] = strval(wdata);
mysql_get_field("LvWeapon2",wdata);
PlayerInfo[playerid][pWeapon][2] = strval(wdata);
mysql_get_field("LvAmmo2",wdata);
PlayerInfo[playerid][pAmmo][2] = strval(wdata);
mysql_get_field("LvWeapon3",wdata);
PlayerInfo[playerid][pWeapon][3] = strval(wdata);
mysql_get_field("LvAmmo3",wdata);
PlayerInfo[playerid][pAmmo][3] = strval(wdata);
mysql_get_field("LvWeapon4",wdata);
PlayerInfo[playerid][pWeapon][4] = strval(wdata);
mysql_get_field("LvAmmo4",wdata);
PlayerInfo[playerid][pAmmo][4] = strval(wdata);
mysql_get_field("LvWeapon5",wdata);
PlayerInfo[playerid][pWeapon][5] = strval(wdata);
mysql_get_field("LvAmmo5",wdata);
PlayerInfo[playerid][pAmmo][5] = strval(wdata);
mysql_get_field("LvWeapon6",wdata);
PlayerInfo[playerid][pWeapon][6] = strval(wdata);
mysql_get_field("LvAmmo6",wdata);
PlayerInfo[playerid][pAmmo][6] = strval(wdata);
mysql_get_field("LvWeapon7",wdata);
PlayerInfo[playerid][pWeapon][7] = strval(wdata);
mysql_get_field("LvAmmo7",wdata);
PlayerInfo[playerid][pAmmo][7] = strval(wdata);
mysql_get_field("LvWeapon8",wdata);
PlayerInfo[playerid][pWeapon][8] = strval(wdata);
mysql_get_field("LvAmmo8",wdata);
PlayerInfo[playerid][pAmmo][8] = strval(wdata);
mysql_get_field("LvWeapon9",wdata);
PlayerInfo[playerid][pWeapon][9] = strval(wdata);
mysql_get_field("LvAmmo9",wdata);
PlayerInfo[playerid][pAmmo][9] = strval(wdata);
mysql_get_field("LvWeapon10",wdata);
PlayerInfo[playerid][pWeapon][10] = strval(wdata);
mysql_get_field("LvAmmo10",wdata);
PlayerInfo[playerid][pAmmo][10] = strval(wdata);
mysql_get_field("LvWeapon11",wdata);
PlayerInfo[playerid][pWeapon][11] = strval(wdata);
mysql_get_field("LvAmmo11",wdata);
PlayerInfo[playerid][pAmmo][11] = strval(wdata);
mysql_get_field("LvWeapon12",wdata);
PlayerInfo[playerid][pWeapon][12] = strval(wdata);
mysql_get_field("LvAmmo12",wdata);
PlayerInfo[playerid][pAmmo][12] = strval(wdata);
mysql_get_field("LvCondom",wdata);
PlayerInfo[playerid][pCondom] = strval(wdata);
mysql_get_field("LvStd1",wdata);
PlayerInfo[playerid][pStd][1] = strval(wdata);
mysql_get_field("LvStd2",wdata);
PlayerInfo[playerid][pStd][2] = strval(wdata);
mysql_get_field("LvStd3",wdata);
PlayerInfo[playerid][pStd][3] = strval(wdata);
mysql_get_field("LvStd4",wdata);
PlayerInfo[playerid][pStd][4] = strval(wdata);
mysql_get_field("LvChastity",wdata);
PlayerInfo[playerid][pChastity] = strval(wdata);
mysql_get_field("LvFightStyle",wdata);
PlayerInfo[playerid][pFightStyle] = strval(wdata);
mysql_get_field("LvAdrenaline",wdata);
PlayerInfo[playerid][pAdrenaline] = strval(wdata);
mysql_get_field("LvEarnings",wdata);
PlayerInfo[playerid][pEarnings] = strval(wdata);
mysql_get_field("LvBank",wdata);
PlayerInfo[playerid][pBank] = strval(wdata);
mysql_get_field("LvInterest",wdata);
PlayerInfo[playerid][pInterest] = strval(wdata);
mysql_get_field("LvTaxes",wdata);
PlayerInfo[playerid][pTaxes] = strval(wdata);
mysql_get_field("LvDebt",wdata);
PlayerInfo[playerid][pDebt] = strval(wdata);
mysql_get_field("LvLifeInsurance",wdata);
PlayerInfo[playerid][pLifeInsurance] = strval(wdata);
mysql_get_field("LvHealthInsurance",wdata);
PlayerInfo[playerid][pHealthInsurance] = strval(wdata);
mysql_get_field("LvBankInsurance",wdata);
PlayerInfo[playerid][pBankInsurance] = strval(wdata);
mysql_get_field("LvWantedLevel",wdata);
PlayerInfo[playerid][pWantedLevel] = strval(wdata);
mysql_get_field("LvDaysAlive",wdata);
PlayerInfo[playerid][pDaysAlive] = strval(wdata);
mysql_get_field("LvDrugs",wdata);
PlayerInfo[playerid][pDrugs] = strval(wdata);
mysql_get_field("LvDeaths",wdata);
PlayerInfo[playerid][pDeaths] = strval(wdata);
mysql_get_field("LvKills",wdata);
PlayerInfo[playerid][pKills] = strval(wdata);
mysql_get_field("LvHeals",wdata);
PlayerInfo[playerid][pHeals] = strval(wdata);
mysql_get_field("LvHealed",wdata);
PlayerInfo[playerid][pHealed] = strval(wdata);
mysql_get_field("LvVehiclesStolen",wdata);
PlayerInfo[playerid][pVehiclesStolen] = strval(wdata);
mysql_get_field("LvVehiclesSold",wdata);
PlayerInfo[playerid][pVehiclesSold] = strval(wdata);
mysql_get_field("LvCrimesCommitted",wdata);
PlayerInfo[playerid][pCrimesCommitted] = strval(wdata);
mysql_get_field("LvTicketsReceived",wdata);
PlayerInfo[playerid][pTicketsReceived] = strval(wdata);
mysql_get_field("LvTicketsPaid",wdata);
PlayerInfo[playerid][pTicketsPaid] = strval(wdata);
mysql_get_field("LvTicketsIssued",wdata);
PlayerInfo[playerid][pTicketsIssued] = strval(wdata);
mysql_get_field("LvTicketsCollected",wdata);
PlayerInfo[playerid][pTicketsCollected] = strval(wdata);
mysql_get_field("LvArrested",wdata);
PlayerInfo[playerid][pArrested] = strval(wdata);
mysql_get_field("LvReported",wdata);
PlayerInfo[playerid][pReported] = strval(wdata);
mysql_get_field("LvArrests",wdata);
PlayerInfo[playerid][pArrests] = strval(wdata);
mysql_get_field("LvReports",wdata);
PlayerInfo[playerid][pReports] = strval(wdata);
mysql_get_field("LvHitsReceived",wdata);
PlayerInfo[playerid][pHitsReceived] = strval(wdata);
mysql_get_field("LvHitsPlaced",wdata);
PlayerInfo[playerid][pHitsPlaced] = strval(wdata);
mysql_get_field("LvRapes",wdata);
PlayerInfo[playerid][pRapes] = strval(wdata);
mysql_get_field("LvRaped",wdata);
PlayerInfo[playerid][pRaped] = strval(wdata);
mysql_get_field("LvRobberies",wdata);
PlayerInfo[playerid][pRobberies] = strval(wdata);
mysql_get_field("LvRobbed",wdata);
PlayerInfo[playerid][pRobbed] = strval(wdata);
mysql_get_field("LvBail",wdata);
PlayerInfo[playerid][pBail] = strval(wdata);
mysql_get_field("LvJailVisits",wdata);
PlayerInfo[playerid][pJailVisits] = strval(wdata);
mysql_get_field("LvJailed",wdata);
PlayerInfo[playerid][pJailed] = strval(wdata);
mysql_get_field("LvJailHour",wdata);
PlayerInfo[playerid][pJailHour] = strval(wdata);
mysql_get_field("LvJailMinute",wdata);
PlayerInfo[playerid][pJailMinute] = strval(wdata);
mysql_get_field("LvHouse",wdata);
PlayerInfo[playerid][pHouse] = strval(wdata);
mysql_get_field("LvCar",wdata);
PlayerInfo[playerid][pCar] = strval(wdata);
mysql_get_field("LvGunLic",wdata);
PlayerInfo[playerid][pGunLic] = strval(wdata);
mysql_get_field("LvMenu_Items",wdata);
Menu_Items[playerid] = strval(wdata);
mysql_get_field("LvMenu_ItemName1",wdata);
strmid(Menu_ItemName[playerid][1], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName2",wdata);
strmid(Menu_ItemName[playerid][2], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName3",wdata);
strmid(Menu_ItemName[playerid][3], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName4",wdata);
strmid(Menu_ItemName[playerid][4], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName5",wdata);
strmid(Menu_ItemName[playerid][5], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName6",wdata);
strmid(Menu_ItemName[playerid][6], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName7",wdata);
strmid(Menu_ItemName[playerid][7], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName8",wdata);
strmid(Menu_ItemName[playerid][8], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName9",wdata);
strmid(Menu_ItemName[playerid][9], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemName10",wdata);
strmid(Menu_ItemName[playerid][10], wdata, 0, strlen(wdata), 256);
mysql_get_field("LvMenu_ItemPrice1",wdata);
Menu_ItemPrice[playerid][1] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice2",wdata);
Menu_ItemPrice[playerid][2] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice3",wdata);
Menu_ItemPrice[playerid][3] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice4",wdata);
Menu_ItemPrice[playerid][4] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice5",wdata);
Menu_ItemPrice[playerid][5] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice6",wdata);
Menu_ItemPrice[playerid][6] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice7",wdata);
Menu_ItemPrice[playerid][7] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice8",wdata);
Menu_ItemPrice[playerid][8] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice9",wdata);
Menu_ItemPrice[playerid][9] = strval(wdata);
mysql_get_field("LvMenu_ItemPrice10",wdata);
Menu_ItemPrice[playerid][10] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice1",wdata);
Menu_ItemMinPrice[playerid][1] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice2",wdata);
Menu_ItemMinPrice[playerid][2] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice3",wdata);
Menu_ItemMinPrice[playerid][3] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice4",wdata);
Menu_ItemMinPrice[playerid][4] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice5",wdata);
Menu_ItemMinPrice[playerid][5] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice6",wdata);
Menu_ItemMinPrice[playerid][6] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice7",wdata);
Menu_ItemMinPrice[playerid][7] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice8",wdata);
Menu_ItemMinPrice[playerid][8] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice9",wdata);
Menu_ItemMinPrice[playerid][9] = strval(wdata);
mysql_get_field("LvMenu_ItemMinPrice10",wdata);
Menu_ItemMinPrice[playerid][10] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice1",wdata);
Menu_ItemMaxPrice[playerid][1] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice2",wdata);
Menu_ItemMaxPrice[playerid][2] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice3",wdata);
Menu_ItemMaxPrice[playerid][3] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice4",wdata);
Menu_ItemMaxPrice[playerid][4] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice5",wdata);
Menu_ItemMaxPrice[playerid][5] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice6",wdata);
Menu_ItemMaxPrice[playerid][6] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice7",wdata);
Menu_ItemMaxPrice[playerid][7] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice8",wdata);
Menu_ItemMaxPrice[playerid][8] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice9",wdata);
Menu_ItemMaxPrice[playerid][9] = strval(wdata);
mysql_get_field("LvMenu_ItemMaxPrice10",wdata);
Menu_ItemMaxPrice[playerid][10] = strval(wdata);
}
case SAN_FIERRO:
{
mysql_get_field("SfResume",wdata);
PlayerInfo[playerid][pResume] = strval(wdata);
mysql_get_field("SfClass",wdata);
PlayerInfo[playerid][pClass] = strval(wdata);
mysql_get_field("SfTeam",wdata);
PlayerInfo[playerid][pTeam] = strval(wdata);
mysql_get_field("SfSkill",wdata);
PlayerInfo[playerid][pSkill] = strval(wdata);
mysql_get_field("SfLevel",wdata);
PlayerInfo[playerid][pLevel] = strval(wdata);
mysql_get_field("SfRank",wdata);
PlayerInfo[playerid][pRank] = strval(wdata);
mysql_get_field("SfMoney",wdata);
PlayerInfo[playerid][pMoney] = strval(wdata);
mysql_get_field("SfFakeSkill",wdata);
PlayerInfo[playerid][pFakeSkill] = strval(wdata);
mysql_get_field("SfGender",wdata);
PlayerInfo[playerid][pGender] = strval(wdata);
mysql_get_field("SfHealth",wdata);
PlayerInfo[playerid][pHealth] = strval(wdata);
mysql_get_field("SfArmour",wdata);
PlayerInfo[playerid][pArmour] = strval(wdata);
mysql_get_field("SfWeapon1",wdata);
PlayerInfo[playerid][pWeapon][1] = strval(wdata);
mysql_get_field("SfAmmo1",wdata);
PlayerInfo[playerid][pAmmo][1] = strval(wdata);
mysql_get_field("SfWeapon2",wdata);
PlayerInfo[playerid][pWeapon][2] = strval(wdata);
mysql_get_field("SfAmmo2",wdata);
PlayerInfo[playerid][pAmmo][2] = strval(wdata);
mysql_get_field("SfWeapon3",wdata);
PlayerInfo[playerid][pWeapon][3] = strval(wdata);
mysql_get_field("SfAmmo3",wdata);
PlayerInfo[playerid][pAmmo][3] = strval(wdata);
mysql_get_field("SfWeapon4",wdata);
PlayerInfo[playerid][pWeapon][4] = strval(wdata);
mysql_get_field("SfAmmo4",wdata);
PlayerInfo[playerid][pAmmo][4] = strval(wdata);
mysql_get_field("SfWeapon5",wdata);
PlayerInfo[playerid][pWeapon][5] = strval(wdata);
mysql_get_field("SfAmmo5",wdata);
PlayerInfo[playerid][pAmmo][5] = strval(wdata);
mysql_get_field("SfWeapon6",wdata);
PlayerInfo[playerid][pWeapon][6] = strval(wdata);
mysql_get_field("SfAmmo6",wdata);
PlayerInfo[playerid][pAmmo][6] = strval(wdata);
mysql_get_field("SfWeapon7",wdata);
PlayerInfo[playerid][pWeapon][7] = strval(wdata);
mysql_get_field("SfAmmo7",wdata);
PlayerInfo[playerid][pAmmo][7] = strval(wdata);
mysql_get_field("SfWeapon8",wdata);
PlayerInfo[playerid][pWeapon][8] = strval(wdata);
mysql_get_field("SfAmmo8",wdata);
PlayerInfo[playerid][pAmmo][8] = strval(wdata);
mysql_get_field("SfWeapon9",wdata);
PlayerInfo[playerid][pWeapon][9] = strval(wdata);
mysql_get_field("SfAmmo9",wdata);
PlayerInfo[playerid][pAmmo][9] = strval(wdata);
mysql_get_field("SfWeapon10",wdata);
PlayerInfo[playerid][pWeapon][10] = strval(wdata);
mysql_get_field("SfAmmo10",wdata);
PlayerInfo[playerid][pAmmo][10] = strval(wdata);
mysql_get_field("SfWeapon11",wdata);
PlayerInfo[playerid][pWeapon][11] = strval(wdata);
mysql_get_field("SfAmmo11",wdata);
PlayerInfo[playerid][pAmmo][11] = strval(wdata);
mysql_get_field("SfWeapon12",wdata);
PlayerInfo[playerid][pWeapon][12] = strval(wdata);
mysql_get_field("SfAmmo12",wdata);
PlayerInfo[playerid][pAmmo][12] = strval(wdata);
mysql_get_field("SfCondom",wdata);
PlayerInfo[playerid][pCondom] = strval(wdata);
mysql_get_field("SfStd1",wdata);
PlayerInfo[playerid][pStd][1] = strval(wdata);
mysql_get_field("SfStd2",wdata);
PlayerInfo[playerid][pStd][2] = strval(wdata);
mysql_get_field("SfStd3",wdata);
PlayerInfo[playerid][pStd][3] = strval(wdata);
mysql_get_field("SfStd4",wdata);
PlayerInfo[playerid][pStd][4] = strval(wdata);
mysql_get_field("SfChastity",wdata);
PlayerInfo[playerid][pChastity] = strval(wdata);
mysql_get_field("SfFightStyle",wdata);
PlayerInfo[playerid][pFightStyle] = strval(wdata);
mysql_get_field("SfAdrenaline",wdata);
PlayerInfo[playerid][pAdrenaline] = strval(wdata);
mysql_get_field("SfEarnings",wdata);
PlayerInfo[playerid][pEarnings] = strval(wdata);
mysql_get_field("SfBank",wdata);
PlayerInfo[playerid][pBank] = strval(wdata);
mysql_get_field("SfInterest",wdata);
PlayerInfo[playerid][pInterest] = strval(wdata);
mysql_get_field("SfTaxes",wdata);
PlayerInfo[playerid][pTaxes] = strval(wdata);
mysql_get_field("SfDebt",wdata);
PlayerInfo[playerid][pDebt] = strval(wdata);
mysql_get_field("SfLifeInsurance",wdata);
PlayerInfo[playerid][pLifeInsurance] = strval(wdata);
mysql_get_field("SfHealthInsurance",wdata);
PlayerInfo[playerid][pHealthInsurance] = strval(wdata);
mysql_get_field("SfBankInsurance",wdata);
PlayerInfo[playerid][pBankInsurance] = strval(wdata);
mysql_get_field("SfWantedLevel",wdata);
PlayerInfo[playerid][pWantedLevel] = strval(wdata);
mysql_get_field("SfDaysAlive",wdata);
PlayerInfo[playerid][pDaysAlive] = strval(wdata);
mysql_get_field("SfDrugs",wdata);
PlayerInfo[playerid][pDrugs] = strval(wdata);
mysql_get_field("SfDeaths",wdata);
PlayerInfo[playerid][pDeaths] = strval(wdata);
mysql_get_field("SfKills",wdata);
PlayerInfo[playerid][pKills] = strval(wdata);
mysql_get_field("SfHeals",wdata);
PlayerInfo[playerid][pHeals] = strval(wdata);
mysql_get_field("SfHealed",wdata);
PlayerInfo[playerid][pHealed] = strval(wdata);
mysql_get_field("SfVehiclesStolen",wdata);
PlayerInfo[playerid][pVehiclesStolen] = strval(wdata);
mysql_get_field("SfVehiclesSold",wdata);
PlayerInfo[playerid][pVehiclesSold] = strval(wdata);
mysql_get_field("SfCrimesCommitted",wdata);
PlayerInfo[playerid][pCrimesCommitted] = strval(wdata);
mysql_get_field("SfTicketsReceived",wdata);
PlayerInfo[playerid][pTicketsReceived] = strval(wdata);
mysql_get_field("SfTicketsPaid",wdata);
PlayerInfo[playerid][pTicketsPaid] = strval(wdata);
mysql_get_field("SfTicketsIssued",wdata);
PlayerInfo[playerid][pTicketsIssued] = strval(wdata);
mysql_get_field("SfTicketsCollected",wdata);
PlayerInfo[playerid][pTicketsCollected] = strval(wdata);
mysql_get_field("SfArrested",wdata);
PlayerInfo[playerid][pArrested] = strval(wdata);
mysql_get_field("SfReported",wdata);
PlayerInfo[playerid][pReported] = strval(wdata);
mysql_get_field("SfArrests",wdata);
PlayerInfo[playerid][pArrests] = strval(wdata);
mysql_get_field("SfReports",wdata);
PlayerInfo[playerid][pReports] = strval(wdata);
mysql_get_field("SfHitsReceived",wdata);
PlayerInfo[playerid][pHitsReceived] = strval(wdata);
mysql_get_field("SfHitsPlaced",wdata);
PlayerInfo[playerid][pHitsPlaced] = strval(wdata);
mysql_get_field("SfRapes",wdata);
PlayerInfo[playerid][pRapes] = strval(wdata);
mysql_get_field("SfRaped",wdata);
PlayerInfo[playerid][pRaped] = strval(wdata);
mysql_get_field("SfRobberies",wdata);
PlayerInfo[playerid][pRobberies] = strval(wdata);
mysql_get_field("SfRobbed",wdata);
PlayerInfo[playerid][pRobbed] = strval(wdata);
mysql_get_field("SfBail",wdata);
PlayerInfo[playerid][pBail] = strval(wdata);
mysql_get_field("SfJailVisits",wdata);
PlayerInfo[playerid][pJailVisits] = strval(wdata);
mysql_get_field("SfJailed",wdata);
PlayerInfo[playerid][pJailed] = strval(wdata);
mysql_get_field("SfJailHour",wdata);
PlayerInfo[playerid][pJailHour] = strval(wdata);
mysql_get_field("SfJailMinute",wdata);
PlayerInfo[playerid][pJailMinute] = strval(wdata);
mysql_get_field("SfHouse",wdata);
PlayerInfo[playerid][pHouse] = strval(wdata);
mysql_get_field("SfCar",wdata);
PlayerInfo[playerid][pCar] = strval(wdata);
mysql_get_field("SfGunLic",wdata);
PlayerInfo[playerid][pGunLic] = strval(wdata);
mysql_get_field("SfMenu_Items",wdata);
Menu_Items[playerid] = strval(wdata);
mysql_get_field("SfMenu_ItemName1",wdata);
strmid(Menu_ItemName[playerid][1], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName2",wdata);
strmid(Menu_ItemName[playerid][2], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName3",wdata);
strmid(Menu_ItemName[playerid][3], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName4",wdata);
strmid(Menu_ItemName[playerid][4], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName5",wdata);
strmid(Menu_ItemName[playerid][5], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName6",wdata);
strmid(Menu_ItemName[playerid][6], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName7",wdata);
strmid(Menu_ItemName[playerid][7], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName8",wdata);
strmid(Menu_ItemName[playerid][8], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName9",wdata);
strmid(Menu_ItemName[playerid][9], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemName10",wdata);
strmid(Menu_ItemName[playerid][10], wdata, 0, strlen(wdata), 256);
mysql_get_field("SfMenu_ItemPrice1",wdata);
Menu_ItemPrice[playerid][1] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice2",wdata);
Menu_ItemPrice[playerid][2] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice3",wdata);
Menu_ItemPrice[playerid][3] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice4",wdata);
Menu_ItemPrice[playerid][4] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice5",wdata);
Menu_ItemPrice[playerid][5] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice6",wdata);
Menu_ItemPrice[playerid][6] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice7",wdata);
Menu_ItemPrice[playerid][7] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice8",wdata);
Menu_ItemPrice[playerid][8] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice9",wdata);
Menu_ItemPrice[playerid][9] = strval(wdata);
mysql_get_field("SfMenu_ItemPrice10",wdata);
Menu_ItemPrice[playerid][10] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice1",wdata);
Menu_ItemMinPrice[playerid][1] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice2",wdata);
Menu_ItemMinPrice[playerid][2] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice3",wdata);
Menu_ItemMinPrice[playerid][3] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice4",wdata);
Menu_ItemMinPrice[playerid][4] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice5",wdata);
Menu_ItemMinPrice[playerid][5] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice6",wdata);
Menu_ItemMinPrice[playerid][6] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice7",wdata);
Menu_ItemMinPrice[playerid][7] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice8",wdata);
Menu_ItemMinPrice[playerid][8] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice9",wdata);
Menu_ItemMinPrice[playerid][9] = strval(wdata);
mysql_get_field("SfMenu_ItemMinPrice10",wdata);
Menu_ItemMinPrice[playerid][10] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice1",wdata);
Menu_ItemMaxPrice[playerid][1] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice2",wdata);
Menu_ItemMaxPrice[playerid][2] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice3",wdata);
Menu_ItemMaxPrice[playerid][3] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice4",wdata);
Menu_ItemMaxPrice[playerid][4] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice5",wdata);
Menu_ItemMaxPrice[playerid][5] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice6",wdata);
Menu_ItemMaxPrice[playerid][6] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice7",wdata);
Menu_ItemMaxPrice[playerid][7] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice8",wdata);
Menu_ItemMaxPrice[playerid][8] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice9",wdata);
Menu_ItemMaxPrice[playerid][9] = strval(wdata);
mysql_get_field("SfMenu_ItemMaxPrice10",wdata);
Menu_ItemMaxPrice[playerid][10] = strval(wdata);
}
}//End Of Switch
}
mysql_free_result();
PlayerInfo[playerid][pLoginTimes] += 1;
format(query,sizeof(query),"UPDATE playerdata SET IP = '%s' WHERE (UserName = '%s')",PIP,PlayerInfo[playerid][pName]);
mysql_query(query); //queries
format(query,sizeof(query),"UPDATE playerdata SET LastLogin = '%s', LoginTimes = '%d' WHERE UserName = '%s'",LastLogin,PlayerInfo[playerid][pLoginTimes],PlayerInfo[playerid][pName]);
mysql_query(query); //queries
mysql_free_result(); //Frees the result
PlayerInfo[playerid][pLogged] = 1;
PlayerInfo[playerid][pRegistered] = 1;
PlayerInfo[playerid][pLoginTimes] ++;
if(PlayerInfo[playerid][pAdminLevel] > 0) {
format(string, sizeof(string), "Logged In As Level %i {FF0000}Admin.",PlayerInfo[playerid][pAdminLevel]);
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
}else{
if(PlayerInfo[playerid][pRegular] > 0) {
format(string, sizeof(string), "Logged In As Level %i {D6D631}Regular Player.",PlayerInfo[playerid][pRegular]);
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, string);
}else{
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "Logged In As {D6D631}Registered Player.");
}
}
new classid = PlayerInfo[playerid][pClass];
OnPlayerRequestClass(playerid, classid);
//mysql_free_result();
} else {
SendClientMessage(playerid, COLOR_ERROR, "Incorrect Password");
SendClientMessage(playerid, COLOR_SERVER_HELP_MSG, "Please Re-Enter Your Password.");
SetPVarInt(playerid, "WrongPass", GetPVarInt(playerid, "WrongPass") + 1);
format(string, sizeof(string), "CnR\n \nThe Name, %s, is Rgistered.\nIf this is not your account, please quit and change your name.\n \nPlease Enter Your Password To Login:",PlayerInfo[playerid][pName],playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT , "CnR Login", string, "Login", "Cancel");
if(GetPVarInt(playerid, "WrongPass") == 3)
{
mysql_free_result();
KickPlayer(playerid,"Server","INVALID LOGIN","Too Many Failed Login's!");
}
}
}else{//End Of Response Check
SendClientMessage(playerid, COLOR_SERVER_MAIN_MSG, "{FFFFFF}Please {FF0000}Change Your Name {FFFFFF}In The {00AAFF}SA-MP Server Browser {FFFFFF}And Reconnect.");
}
}//End Of Dialog Check
return 1;