PDA

View Full Version : Money Problem


MushLand
13/10/2015, 06:24 PM
Hi , I have a little problem when you give to get back on server 0 gives me money , can you tell me what the problem is please?

jlalt
13/10/2015, 06:51 PM
what you use to save player money and what you use to load them?
where you give the player money?
show some codes at least we can't suggest your script o.O

MushLand
14/10/2015, 01:02 PM
Well what code to give ? As I said above , and any player who re-enter the server has the money to 0. And before you take money out .

jlalt
14/10/2015, 01:04 PM
show how you saveing the money and how you load them if you're using a gamemode / admin system posted at sa-mp forum would you say which one? / give link?

MushLand
15/10/2015, 03:21 PM
public OnPlayerSave(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
new pName[ MAX_PLAYER_NAME ];
GetPlayerName( playerid, pName, MAX_PLAYER_NAME );
szQuery[ 0 ] = EOS;
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Status='%d' WHERE `Name` = '%e'", PlayerInfo[ playerid ][ pStatus ], pName ); mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET RealPass='%e' WHERE `Name` = '%e'", PlayerInfo[ playerid ][ pRealKey ], pName ); mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Level=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLevel], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AdminLevel=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pAdmin], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET HelperLevel=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pHelper], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET DonateRank=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pDonateRank], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET PremiumPoints=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pPremiumP], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET UpgradePoints=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][gPupgrade], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET ConnectedTime=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pConnectTime], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET LicenseTime=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pLicenseTime], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Registered=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pReg], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Sex=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pSex], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Age=%d WHERE `Name` = '%e' LIMIT 1",PlayerInfo[playerid][pAge], pName);mysql_tquery( mysql_db, szQuery );
PlayerInfo[playerid][pCash] = GetPlayerCash(playerid);
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Origin=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pOrigin], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CK=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCK], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Muted=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMuted], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET NMuted=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pNMuted], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Respect=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pExp], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Money=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCash], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Bank=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAccount], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Bank2=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAccount2], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Crimes=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCrimes], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Kills=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pKills], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Deaths=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pDeaths], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Arrested=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pArrested], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET pWantedDeaths=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pWantedDeaths], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Phonebook=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPhoneBook], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET LottoNr=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLottoNr], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Imprumut=%d WHERE `Name` = '%e'", PlayerInfo[playerid][pImprumut], pName); mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Fishes=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFishes], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET BiggestFish=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pBiggestFish], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Job=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pJob], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Paycheck=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPayCheck], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET HeadValue=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pHeadValue], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Jailed=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pJailed], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET JailTime=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pJailTime], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Materials=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMats], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Drugs=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pDrugs], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Pills=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPills], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET SafeMats=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pBoxMats], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET SafeDrugs=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pBoxDrugs], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET InGG=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pInGG], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET VirWorld=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pVirWorld], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Rob=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pRob], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Style=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pStyle], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Tow=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTow], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET WantedLevel=%d WHERE `Name` = '%e'",WantedLevel[playerid], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET WantedPoints=%d WHERE `Name` = '%e'",WantedPoints[playerid], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET HealKit=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pKit], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AD=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAD], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AdminSec=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pSec], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AdminTimer=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTimer], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Assists=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAssists], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Arrests=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pArrests], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET NewsTotal=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pNewsTotal], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET LicensesTotal=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLicensesTotal], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET TaxiCalls=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTaxiCalls], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET MedicCalls=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMedicCalls], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET ContracteEfectuate=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pContractsEf], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET ContracteNeefectuate=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pContractsNef], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET TicketCasino=%d WHERE `Name` = '%e'",TicketCasino[playerid], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Family=%d WHERE `Name` = '%e'",player_family[playerid], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET ClanLeader=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pClanLeader], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CompMission=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCompMission], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET SpawnLocation=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pSpawnLoc], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Leader=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLeader], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Member=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMember], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Rank=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pRank], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET pChar=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pChar], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET ContractTime=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pContractTime], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET DetSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pDetSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET BoxSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pBoxSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET LawSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLawSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET MechSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMechSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET JackSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pJackSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CarSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCarSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET NewsSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pNewsSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET DrugsSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pDrugsSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET MissionSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMissionSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CookSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCookSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET FishSkill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFishSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Truckskill=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTruckSkill], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET pSHealth=%.1f WHERE `Name` = '%e'",PlayerInfo[playerid][pSHealth], pName);mysql_tquery( mysql_db, szQuery );
GetPlayerHealth(playerid,PlayerInfo[playerid][pHealth]);
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET pHealth=%.1f WHERE `Name` = '%e'",PlayerInfo[playerid][pHealth], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Interior=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pInt], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Local=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLocal], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Team=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTeam], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Model=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pModel], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET PhoneNr=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPnumber], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET House=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPhousekey], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Bizz=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPbiskey], pName);mysql_tquery( mysql_db, szQuery );
if ((PlayerInfo[playerid][pPos_x]==0.0 && PlayerInfo[playerid][pPos_y]==0.0 && PlayerInfo[playerid][pPos_z]==0.0))
{
PlayerInfo[playerid][pPos_x] = 1684.9;
PlayerInfo[playerid][pPos_y] = -2244.5;
PlayerInfo[playerid][pPos_z] = 13.5;
}
if(Spectate[playerid] != 255)
{
PlayerInfo[playerid][pPos_x] = Unspec[playerid][sPx];
PlayerInfo[playerid][pPos_y] = Unspec[playerid][sPy];
PlayerInfo[playerid][pPos_z] = Unspec[playerid][sPz];
PlayerInfo[playerid][pInt] = Unspec[playerid][sPint];
PlayerInfo[playerid][pLocal] = Unspec[playerid][sLocal];
}
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Pos_x=%.1f WHERE `Name` = '%e'",PlayerInfo[playerid][pPos_x], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Pos_y=%.1f WHERE `Name` = '%e'",PlayerInfo[playerid][pPos_y], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Pos_z=%.1f WHERE `Name` = '%e'",PlayerInfo[playerid][pPos_z], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CarLic=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCarLic], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET FlyLic=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFlyLic], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET BoatLic=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pBoatLic], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET FishLic=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFishLic], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET GunLic=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pGunLic], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET LicenseSuspended=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLicSuspend], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Gun1=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pGun1], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Gun2=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pGun2], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Gun3=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pGun3], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Gun4=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pGun4], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Ammo1=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAmmo1], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Ammo2=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAmmo2], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Ammo3=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAmmo3], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Ammo4=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAmmo4], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CarTime=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCarTime], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET PayDay=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPayDay], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET PayDayHad=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPayDayHad], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CDPlayer=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCDPlayer], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Wins=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pWins], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Loses=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLoses], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AlcoholPerk=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAlcoholPerk], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET DrugPerk=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pDrugPerk], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET MiserPerk=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMiserPerk], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET PainPerk=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPainPerk], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET TraderPerk=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTraderPerk], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Tutorial=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pTut], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Mission=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMissionNr], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Warnings=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pWarns], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET FacWarns=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFACWarns], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Punish=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPunish], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET CPunish=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pCPunish], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET AccesWarns=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAWarns], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Adjustable=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pAdjustable], pName);mysql_tquery( mysql_db, szQuery );
if(PlayerInfo[playerid][pDonateRank] < 1) { PlayerInfo[playerid][pFuel] = 0; }
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Fuel=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pFuel], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Married=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pMarried], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Pick=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pPick], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET MarriedTo='%e' WHERE `Name` = '%e'",PlayerInfo[playerid][pMarriedTo], pName);mysql_tquery( mysql_db, szQuery );
mysql_format( mysql_db, szQuery, sizeof( szQuery ), "UPDATE `users` SET Locked=%d WHERE `Name` = '%e'",PlayerInfo[playerid][pLocked], pName);mysql_tquery( mysql_db, szQuery );
}
}
return 1;
}

public OnPlayerLogin(playerid,password[])
{
new tmp2[256];
new string2[128];// era 64
new string[128];
new playersip[24];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
GetPlayerIp(playerid, playersip, sizeof(playersip));
szQuery[ 0 ] = EOS;
new szPass[ 129 ];
WP_Hash(szPass, sizeof(szPass), password);
mysql_format( mysql_db, szQuery, 256, "SELECT * FROM `users` WHERE `Name` = '%s' AND `Password` = '%s'", GetName( playerid ), szPass );
printf("%s", szQuery);
new Cache: r = mysql_query( mysql_db, szQuery );
if ( cache_get_row_count( mysql_db ) > 0 )
{
mysql_format( mysql_db, PlayerInfo[ playerid ][ pRealKey ], 128, "%e", password );
cache_get_field_content( 0, "Password", PlayerInfo[ playerid ][ pKey ], mysql_db, 128 );
PlayerInfo[ playerid ][ pLevel ] = cache_get_field_content_int( 0, "Level", mysql_db );
PlayerInfo[ playerid ][ pStatus ] = cache_get_field_content_int( 0, "Status", mysql_db );
PlayerInfo[ playerid ][ pAdmin ] = cache_get_field_content_int( 0, "AdminLevel", mysql_db );
PlayerInfo[ playerid ][ pHelper ] = cache_get_field_content_int( 0, "HelperLevel", mysql_db );
PlayerInfo[ playerid ][ pDonateRank ] = cache_get_field_content_int( 0, "DonateRank", mysql_db );
PlayerInfo[ playerid ][ pPremiumP ] = cache_get_field_content_int( 0, "PremiumPoints", mysql_db );
PlayerInfo[ playerid ][ gPupgrade ] = cache_get_field_content_int( 0, "UpgradePoints", mysql_db );
PlayerInfo[ playerid ][ pConnectTime ] = cache_get_field_content_int( 0, "ConnectedTime", mysql_db );
PlayerInfo[ playerid ][ pLicenseTime ] = cache_get_field_content_int( 0, "LicenseTime", mysql_db );
PlayerInfo[ playerid ][ pReg ] = cache_get_field_content_int( 0, "Registered", mysql_db );
PlayerInfo[ playerid ][ pSex ] = cache_get_field_content_int( 0, "Sex", mysql_db );
PlayerInfo[ playerid ][ pAge ] = cache_get_field_content_int( 0, "Age", mysql_db );
PlayerInfo[ playerid ][ pOrigin ] = cache_get_field_content_int( 0, "Origin", mysql_db );
PlayerInfo[ playerid ][ pCK ] = cache_get_field_content_int( 0, "CK", mysql_db );
PlayerInfo[ playerid ][ pMuted ] = cache_get_field_content_int( 0, "Muted", mysql_db );
PlayerInfo[ playerid ][ pNMuted ] = cache_get_field_content_int( 0, "NMuted", mysql_db );
PlayerInfo[ playerid ][ pExp ] = cache_get_field_content_int( 0, "Respect", mysql_db );
PlayerInfo[ playerid ][ pCash ] = cache_get_field_content_int( 0, "Money", mysql_db );
PlayerInfo[ playerid ][ pAccount ] = cache_get_field_content_int( 0, "Bank", mysql_db );
PlayerInfo[ playerid ][ pAccount2 ] = cache_get_field_content_int( 0, "Bank2", mysql_db );
PlayerInfo[ playerid ][ pCrimes ] = cache_get_field_content_int( 0, "Crimes", mysql_db );
PlayerInfo[ playerid ][ pKills ] = cache_get_field_content_int( 0, "Kills", mysql_db );
PlayerInfo[ playerid ][ pDeaths ] = cache_get_field_content_int( 0, "Deaths", mysql_db );
PlayerInfo[ playerid ][ pArrested ] = cache_get_field_content_int( 0, "Arrested", mysql_db );
PlayerInfo[ playerid ][ pWantedDeaths ] = cache_get_field_content_int( 0, "WantedDeaths", mysql_db );
PlayerInfo[ playerid ][ pPhoneBook ] = cache_get_field_content_int( 0, "Phonebook", mysql_db );
PlayerInfo[ playerid ][ pLottoNr ] = cache_get_field_content_int( 0, "LottoNr", mysql_db );
PlayerInfo[ playerid ][ pImprumut ] = cache_get_field_content_int( 0, "Imprumut", mysql_db );
PlayerInfo[ playerid ][ pFishes ] = cache_get_field_content_int( 0, "Fishes", mysql_db );
PlayerInfo[ playerid ][ pBiggestFish ] = cache_get_field_content_int( 0, "BiggestFish", mysql_db );
PlayerInfo[ playerid ][ pJob ] = cache_get_field_content_int( 0, "Job", mysql_db );
PlayerInfo[ playerid ][ pPayCheck ] = cache_get_field_content_int( 0, "Paycheck", mysql_db );
PlayerInfo[ playerid ][ pHeadValue ] = cache_get_field_content_int( 0, "HeadValue", mysql_db );
PlayerInfo[ playerid ][ pJailed ] = cache_get_field_content_int( 0, "Jailed", mysql_db );
PlayerInfo[ playerid ][ pJailTime ] = cache_get_field_content_int( 0, "JailTime", mysql_db );
PlayerInfo[ playerid ][ pMats ] = cache_get_field_content_int( 0, "Materials", mysql_db );
PlayerInfo[ playerid ][ pDrugs ] = cache_get_field_content_int( 0, "Drugs", mysql_db );
PlayerInfo[ playerid ][ pPills ] = cache_get_field_content_int( 0, "Pills", mysql_db );
PlayerInfo[ playerid ][ pPillsTime ] = cache_get_field_content_int( 0, "PillsTime", mysql_db );
PlayerInfo[ playerid ][ pBoxMats ] = cache_get_field_content_int( 0, "SafeMats", mysql_db );
PlayerInfo[ playerid ][ pBoxDrugs ] = cache_get_field_content_int( 0, "SafeDrugs", mysql_db );
PlayerInfo[ playerid ][ pInGG ] = cache_get_field_content_int( 0, "InGG", mysql_db );
PlayerInfo[ playerid ][ pVirWorld ] = cache_get_field_content_int( 0, "VirWorld", mysql_db );
PlayerInfo[ playerid ][ pRob ] = cache_get_field_content_int( 0, "Rob", mysql_db );
PlayerInfo[ playerid ][ pStyle ] = cache_get_field_content_int( 0, "Style", mysql_db );
PlayerInfo[ playerid ][ pTow ] = cache_get_field_content_int( 0, "Tow", mysql_db );
WantedLevel[ playerid ] = cache_get_field_content_int( 0, "WantedLevel", mysql_db );
WantedPoints[ playerid ] = cache_get_field_content_int( 0, "WantedPoints", mysql_db );
PlayerInfo[ playerid ][ pCompMission ] = cache_get_field_content_int( 0, "CompMission", mysql_db );
PlayerInfo[ playerid ][ pKit ] = cache_get_field_content_int( 0, "HealKit", mysql_db );
PlayerInfo[ playerid ][ pAD ] = cache_get_field_content_int( 0, "AD", mysql_db );
PlayerInfo[ playerid ][ pSec ] = cache_get_field_content_int( 0, "AdminSec", mysql_db );
PlayerInfo[ playerid ][ pTimer ] = cache_get_field_content_int( 0, "AdminTimer", mysql_db );
PlayerInfo[ playerid ][ pAssists ] = cache_get_field_content_int( 0, "Assists", mysql_db );
PlayerInfo[ playerid ][ pArrests ] = cache_get_field_content_int( 0, "Arrests", mysql_db );
PlayerInfo[ playerid ][ pNewsTotal ] = cache_get_field_content_int( 0, "NewsTotal", mysql_db );
PlayerInfo[ playerid ][ pLicensesTotal ] = cache_get_field_content_int( 0, "LicensesTotal", mysql_db );
PlayerInfo[ playerid ][ pTaxiCalls ] = cache_get_field_content_int( 0, "TaxiCalls", mysql_db );
PlayerInfo[ playerid ][ pMedicCalls ] = cache_get_field_content_int( 0, "MedicCalls", mysql_db );
PlayerInfo[ playerid ][ pContractsEf ] = cache_get_field_content_int( 0, "ContracteEfectuate", mysql_db );
PlayerInfo[ playerid ][ pContractsNef ] = cache_get_field_content_int( 0, "ContracteNeefectuate", mysql_db );
TicketCasino[ playerid ] = cache_get_field_content_int( 0, "TicketCasino", mysql_db );
player_family[playerid] = cache_get_field_content_int( 0, "Family", mysql_db );
PlayerInfo[ playerid ][ pClanLeader ] = cache_get_field_content_int( 0, "ClanLeader", mysql_db );
PlayerInfo[ playerid ][ pSpawnLoc ] = cache_get_field_content_int( 0, "SpawnLocation", mysql_db );
PlayerInfo[ playerid ][ pLeader ] = cache_get_field_content_int( 0, "Leader", mysql_db );
PlayerInfo[ playerid ][ pMember ] = cache_get_field_content_int( 0, "Member", mysql_db );
PlayerInfo[ playerid ][ pRank ] = cache_get_field_content_int( 0, "Rank", mysql_db );
PlayerInfo[ playerid ][ pChar ] = cache_get_field_content_int( 0, "pChar", mysql_db );
PlayerInfo[ playerid ][ pContractTime ] = cache_get_field_content_int( 0, "ContractTime", mysql_db );
PlayerInfo[ playerid ][ pDetSkill ] = cache_get_field_content_int( 0, "DetSkill", mysql_db );
PlayerInfo[ playerid ][ pBoxSkill ] = cache_get_field_content_int( 0, "BoxSkill", mysql_db );
PlayerInfo[ playerid ][ pLawSkill ] = cache_get_field_content_int( 0, "LawSkill", mysql_db );
PlayerInfo[ playerid ][ pMechSkill ] = cache_get_field_content_int( 0, "MechSkill", mysql_db );
PlayerInfo[ playerid ][ pJackSkill ] = cache_get_field_content_int( 0, "JackSkill", mysql_db );
PlayerInfo[ playerid ][ pCarSkill ] = cache_get_field_content_int( 0, "CarSkill", mysql_db );
PlayerInfo[ playerid ][ pNewsSkill ] = cache_get_field_content_int( 0, "NewsSkill", mysql_db );
PlayerInfo[ playerid ][ pDrugsSkill ] = cache_get_field_content_int( 0, "DrugsSkill", mysql_db );
PlayerInfo[ playerid ][ pMissionSkill ] = cache_get_field_content_int( 0, "MissionSkill", mysql_db );
PlayerInfo[ playerid ][ pCookSkill ] = cache_get_field_content_int( 0, "CookSkill", mysql_db );
PlayerInfo[ playerid ][ pFishSkill ] = cache_get_field_content_int( 0, "FishSkill", mysql_db );
PlayerInfo[ playerid ][ pTruckSkill ] = cache_get_field_content_int( 0, "Truckskill", mysql_db );
PlayerInfo[ playerid ][ pSHealth ] = cache_get_field_content_int( 0, "pSHealth", mysql_db );
PlayerInfo[ playerid ][ pHealth ] = cache_get_field_content_int( 0, "pHealth", mysql_db );
PlayerInfo[ playerid ][ pInt ] = cache_get_field_content_int( 0, "Interior", mysql_db );
PlayerInfo[ playerid ][ pLocal ] = cache_get_field_content_int( 0, "Local", mysql_db );
PlayerInfo[ playerid ][ pTeam ] = cache_get_field_content_int( 0, "Team", mysql_db );
PlayerInfo[ playerid ][ pModel ] = cache_get_field_content_int( 0, "Model", mysql_db );
PlayerInfo[ playerid ][ pPnumber ] = cache_get_field_content_int( 0, "PhoneNr", mysql_db );
PlayerInfo[ playerid ][ pPhousekey ] = cache_get_field_content_int( 0, "House", mysql_db );
PlayerInfo[ playerid ][ pPbiskey ] = cache_get_field_content_int( 0, "Bizz", mysql_db );
PlayerInfo[ playerid ][ pPos_x ] = cache_get_field_content_float( 0, "Pos_x", mysql_db );
PlayerInfo[ playerid ][ pPos_y ] = cache_get_field_content_float( 0, "Pos_y", mysql_db );
PlayerInfo[ playerid ][ pPos_z ] = cache_get_field_content_float( 0, "Pos_z", mysql_db );
PlayerInfo[ playerid ][ pCarLic ] = cache_get_field_content_int( 0, "CarLic", mysql_db );
PlayerInfo[ playerid ][ pFlyLic ] = cache_get_field_content_int( 0, "FlyLic", mysql_db );
PlayerInfo[ playerid ][ pBoatLic ] = cache_get_field_content_int( 0, "BoatLic", mysql_db );
PlayerInfo[ playerid ][ pFishLic ] = cache_get_field_content_int( 0, "FishLic", mysql_db );
PlayerInfo[ playerid ][ pGunLic ] = cache_get_field_content_int( 0, "GunLic", mysql_db );
PlayerInfo[ playerid ][ pLicSuspend ] = cache_get_field_content_int( 0, "LicenseSuspended", mysql_db );
PlayerInfo[ playerid ][ pGun1 ] = cache_get_field_content_int( 0, "Gun1", mysql_db );
PlayerInfo[ playerid ][ pGun2 ] = cache_get_field_content_int( 0, "Gun2", mysql_db );
PlayerInfo[ playerid ][ pGun3 ] = cache_get_field_content_int( 0, "Gun3", mysql_db );
PlayerInfo[ playerid ][ pGun4 ] = cache_get_field_content_int( 0, "Gun4", mysql_db );
PlayerInfo[ playerid ][ pAmmo1 ] = cache_get_field_content_int( 0, "Ammo1", mysql_db );
PlayerInfo[ playerid ][ pAmmo2 ] = cache_get_field_content_int( 0, "Ammo2", mysql_db );
PlayerInfo[ playerid ][ pAmmo3 ] = cache_get_field_content_int( 0, "Ammo3", mysql_db );
PlayerInfo[ playerid ][ pAmmo4 ] = cache_get_field_content_int( 0, "Ammo4", mysql_db );
PlayerInfo[ playerid ][ pCarTime ] = cache_get_field_content_int( 0, "CarTime", mysql_db );
PlayerInfo[ playerid ][ pPayDay ] = cache_get_field_content_int( 0, "PayDay", mysql_db );
PlayerInfo[ playerid ][ pPayDayHad ] = cache_get_field_content_int( 0, "PayDayHad", mysql_db );
PlayerInfo[ playerid ][ pCDPlayer ] = cache_get_field_content_int( 0, "CDPlayer", mysql_db );
PlayerInfo[ playerid ][ pWins ] = cache_get_field_content_int( 0, "Wins", mysql_db );
PlayerInfo[ playerid ][ pLoses ] = cache_get_field_content_int( 0, "Loses", mysql_db );
PlayerInfo[ playerid ][ pAlcoholPerk ] = cache_get_field_content_int( 0, "AlcoholPerk", mysql_db );
PlayerInfo[ playerid ][ pDrugPerk ] = cache_get_field_content_int( 0, "DrugPerk", mysql_db );
PlayerInfo[ playerid ][ pPainPerk ] = cache_get_field_content_int( 0, "PainPerk", mysql_db );
PlayerInfo[ playerid ][ pTraderPerk ] = cache_get_field_content_int( 0, "TraderPerk", mysql_db );
PlayerInfo[ playerid ][ pTut ] = cache_get_field_content_int( 0, "Tutorial", mysql_db );
PlayerInfo[ playerid ][ pMissionNr ] = cache_get_field_content_int( 0, "Mission", mysql_db );
PlayerInfo[ playerid ][ pWarns ] = cache_get_field_content_int( 0, "Warnings", mysql_db );
PlayerInfo[ playerid ][ pFACWarns ] = cache_get_field_content_int( 0, "FacWarns", mysql_db );
PlayerInfo[ playerid ][ pPunish ] = cache_get_field_content_int( 0, "Punish", mysql_db );
PlayerInfo[ playerid ][ pCPunish ] = cache_get_field_content_int( 0, "CPunish", mysql_db );
PlayerInfo[ playerid ][ pAWarns ] = cache_get_field_content_int( 0, "AccesWarns", mysql_db );
PlayerInfo[ playerid ][ pAdjustable ] = cache_get_field_content_int( 0, "Adjustable", mysql_db );
PlayerInfo[ playerid ][ pFuel ] = cache_get_field_content_int( 0, "Fuel", mysql_db );
PlayerInfo[ playerid ][ pMarried ] = cache_get_field_content_int( 0, "Married", mysql_db );
PlayerInfo[ playerid ][ pLocked ] = cache_get_field_content_int( 0, "Locked", mysql_db );
PlayerInfo[ playerid ][ pMiserPerk ] = cache_get_field_content_int( 0, "MiserPerk", mysql_db );
PlayerInfo[ playerid ][ pPick ] = cache_get_field_content_int(0, "Pick", mysql_db);
cache_get_field_content( 0, "MarriedTo", PlayerInfo[ playerid ][ pMarriedTo ], mysql_db, 128 );
cache_get_field_content ( 0, "Email", PlayerInfo [ playerid ] [ pEmail ], mysql_db, 64 );
print("Login: data loaded");
}
else
{
new loginstring[128];
new loginname[64];
GetPlayerName(playerid,loginname,sizeof(loginname) );
format(loginstring,sizeof(loginstring),"{FFFFFF}WRONG {FF5E00}PASSWORD \n \n{FFFFFF}Please enter the correct {FF5E00}password:",loginname);
ShowPlayerDialog(playerid,12347,DIALOG_STYLE_PASSW ORD,"Login",loginstring,"Login","Disconnect");
gPlayerLogTries[playerid] += 1;
format(string, sizeof(string), "{FF0000}ATENTIE: {FFFF00}Daca gresesti parola de 4 ori consecutiv primesti ban.Ai gresit de %d/{FF0000}4 {FFFF00}ori.", gPlayerLogTries[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
cache_delete( r );
if(gPlayerLogTries[playerid] == 4) { BanEx(playerid, "Failed Password"); }
print("Login: Wrong Pass");
return 1;
}
cache_delete( r );
mysql_format( mysql_db, szQuery, 128, "UPDATE `users` SET `RealPass` = '%e' WHERE `Name` = '%e'", PlayerInfo[ playerid ][ pRealKey ], GetName( playerid ) );
mysql_tquery( mysql_db, szQuery );
SetTimerEx("HideGlobalNews", 30000, 0, "d", playerid);
if(PlayerInfo[playerid][pCash] <= 0) PlayerInfo[playerid][pCash] = 0;

MushLand
15/10/2015, 03:25 PM
wrong srry