Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public load_stats(playerid)
- {
- new playername[MAX_PLAYER_NAME];
- new sql[80], row[512];
- new pdata[122][64];
- GetPlayerName(playerid, playername, sizeof(playername));
- format(sql, sizeof(sql), "SELECT * FROM players WHERE Name='%s'", playername);
- mysql_query(sql);
- //if (DEBUG) SQLLog(sql);
- mysql_store_result();
- if (mysql_num_rows() == 0)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Houve um erro na autenticação.");
- return 1;
- }
- else
- {
- // fetch user profile
- mysql_fetch_row(row);
- splith(row, pdata, '|');
- SendClientMessage(playerid, COLOR_LIGHTRED, "Carregou 3.");
- PlayerInfo[playerid][pLevel] = strval(pdata[3]);
- PlayerInfo[playerid][pAdmin] = strval(pdata[4]);
- PlayerInfo[playerid][pDonateRank] = strval(pdata[5]);
- PlayerInfo[playerid][gPupgrade] = strval(pdata[6]);
- PlayerInfo[playerid][pConnectTime] = strval(pdata[7]);
- PlayerInfo[playerid][pReg] = strval(pdata[8]);
- PlayerInfo[playerid][pSex] = strval(pdata[9]);
- PlayerInfo[playerid][pAge] = strval(pdata[10]);
- PlayerInfo[playerid][pOrigin] = strval(pdata[11]);
- PlayerInfo[playerid][pCK] = strval(pdata[12]);
- PlayerInfo[playerid][pMuted] = strval(pdata[13]);
- PlayerInfo[playerid][pExp] = strval(pdata[14]);
- PlayerInfo[playerid][pCash] = strval(pdata[15]);
- PlayerInfo[playerid][pAccount] = strval(pdata[16]);
- PlayerInfo[playerid][pCrimes] = strval(pdata[17]);
- PlayerInfo[playerid][pKills] = strval(pdata[18]);
- PlayerInfo[playerid][pDeaths] = strval(pdata[19]);
- PlayerInfo[playerid][pArrested] = strval(pdata[20]);
- PlayerInfo[playerid][pWantedDeaths] = strval(pdata[21]);
- PlayerInfo[playerid][pPhoneBook] = strval(pdata[22]);
- PlayerInfo[playerid][pLottoNr] = strval(pdata[23]);
- PlayerInfo[playerid][pFishes] = strval(pdata[24]);
- PlayerInfo[playerid][pBiggestFish] = strval(pdata[25]);
- PlayerInfo[playerid][pJob] = strval(pdata[26]);
- PlayerInfo[playerid][pPayCheck] = strval(pdata[27]);
- PlayerInfo[playerid][pHeadValue] = strval(pdata[28]);
- PlayerInfo[playerid][pJailed] = strval(pdata[29]);
- PlayerInfo[playerid][pJailTime] = strval(pdata[30]);
- PlayerInfo[playerid][pMats] = strval(pdata[31]);
- PlayerInfo[playerid][pDrugs] = strval(pdata[32]);
- PlayerInfo[playerid][pLeader] = strval(pdata[33]);
- PlayerInfo[playerid][pMember] = strval(pdata[34]);
- PlayerInfo[playerid][pFMember] = strval(pdata[35]);
- PlayerInfo[playerid][pRank] = strval(pdata[36]);
- PlayerInfo[playerid][pChar] = strval(pdata[37]);
- PlayerInfo[playerid][pContractTime] = strval(pdata[38]);
- PlayerInfo[playerid][pDetSkill] = strval(pdata[39]);
- PlayerInfo[playerid][pSexSkill] = strval(pdata[40]);
- PlayerInfo[playerid][pBoxSkill] = strval(pdata[41]);
- PlayerInfo[playerid][pLawSkill] = strval(pdata[42]);
- PlayerInfo[playerid][pMechSkill] = strval(pdata[43]);
- PlayerInfo[playerid][pJackSkill] = strval(pdata[44]);
- PlayerInfo[playerid][pCarSkill] = strval(pdata[45]);
- PlayerInfo[playerid][pNewsSkill] = strval(pdata[46]);
- PlayerInfo[playerid][pDrugsSkill] = strval(pdata[47]);
- PlayerInfo[playerid][pCookSkill] = strval(pdata[48]);
- PlayerInfo[playerid][pFishSkill] = strval(pdata[49]);
- PlayerInfo[playerid][pSHealth] = floatstr(pdata[50]);
- PlayerInfo[playerid][pHealth] = floatstr(pdata[51]);
- PlayerInfo[playerid][pInt] = strval(pdata[52]);
- PlayerInfo[playerid][pLocal] = strval(pdata[53]);
- PlayerInfo[playerid][pTeam] = strval(pdata[54]);
- PlayerInfo[playerid][pModel] = strval(pdata[55]);
- PlayerInfo[playerid][pPnumber] = strval(pdata[56]);
- PlayerInfo[playerid][pPhousekey] = strval(pdata[57]);
- PlayerInfo[playerid][pPcarkey] = strval(pdata[58]);
- PlayerInfo[playerid][pPapptkey] = strval(pdata[59]);
- PlayerInfo[playerid][pPbiskey] = strval(pdata[60]);
- PlayerInfo[playerid][pPos_x] = floatstr(pdata[61]);
- PlayerInfo[playerid][pPos_y] = floatstr(pdata[62]);
- PlayerInfo[playerid][pPos_z] = floatstr(pdata[63]);
- PlayerInfo[playerid][pCarLic] = strval(pdata[64]);
- PlayerInfo[playerid][pFlyLic] = strval(pdata[65]);
- PlayerInfo[playerid][pBoatLic] = strval(pdata[66]);
- PlayerInfo[playerid][pFishLic] = strval(pdata[67]);
- PlayerInfo[playerid][pGunLic] = strval(pdata[68]);
- PlayerInfo[playerid][pGun1] = strval(pdata[69]);
- PlayerInfo[playerid][pGun2] = strval(pdata[70]);
- PlayerInfo[playerid][pGun3] = strval(pdata[71]);
- PlayerInfo[playerid][pGun4] = strval(pdata[72]);
- PlayerInfo[playerid][pAmmo1] = strval(pdata[73]);
- PlayerInfo[playerid][pAmmo2] = strval(pdata[74]);
- PlayerInfo[playerid][pAmmo3] = strval(pdata[75]);
- PlayerInfo[playerid][pAmmo4] = strval(pdata[76]);
- PlayerInfo[playerid][pCarTime] = strval(pdata[77]);
- PlayerInfo[playerid][pPayDay] = strval(pdata[78]);
- PlayerInfo[playerid][pPayDayHad] = strval(pdata[79]);
- PlayerInfo[playerid][pCDPlayer] = strval(pdata[80]);
- PlayerInfo[playerid][pWins] = strval(pdata[81]);
- PlayerInfo[playerid][pLoses] = strval(pdata[82]);
- PlayerInfo[playerid][pAlcoholPerk] = strval(pdata[83]);
- PlayerInfo[playerid][pDrugPerk] = strval(pdata[84]);
- PlayerInfo[playerid][pMiserPerk] = strval(pdata[85]);
- PlayerInfo[playerid][pPainPerk] = strval(pdata[86]);
- PlayerInfo[playerid][pTraderPerk] = strval(pdata[87]);
- PlayerInfo[playerid][pTut] = strval(pdata[88]);
- PlayerInfo[playerid][pMissionNr] = strval(pdata[89]);
- PlayerInfo[playerid][pWarns] = strval(pdata[90]);
- PlayerInfo[playerid][pAdjustable] = strval(pdata[91]);
- PlayerInfo[playerid][pFuel] = strval(pdata[92]);
- PlayerInfo[playerid][pMarried] = strval(pdata[93]);
- PlayerInfo[playerid][pMarriedTo] = strmid(PlayerInfo[playerid][pMarriedTo], pdata[94], 0, strlen(pdata[94])-1, 255);
- PlayerInfo[playerid][pLinked] = strval(pdata[96]);
- PlayerInfo[playerid][pDeagle] = strval(pdata[97]);
- PlayerInfo[playerid][pShotgun] = strval(pdata[98]);
- PlayerInfo[playerid][pRifle] = strval(pdata[99]);
- PlayerInfo[playerid][pSDPistol] = strval(pdata[100]);
- PlayerInfo[playerid][pMP5] = strval(pdata[101]);
- PlayerInfo[playerid][pM4] = strval(pdata[102]);
- PlayerInfo[playerid][pAK47] = strval(pdata[103]);
- format(PlayerInfo[playerid][pStartIP], 16, "%s", pdata[104]);
- format(PlayerInfo[playerid][pEndIP], 16, "%s", pdata[105]);
- PlayerInfo[playerid][pLocker] = strval(pdata[106]);
- PlayerInfo[playerid][pRadioFrequency] = strval(pdata[107]);
- PlayerInfo[playerid][pRadio] = strval(pdata[108]);
- PlayerInfo[playerid][pPecArm] = strval(pdata[109]);
- PlayerInfo[playerid][pMesa] = strval(pdata[110]);
- PlayerInfo[playerid][pLuvas] = strval(pdata[111]);
- drugInfo[playerid][dgCocaina] = strval(pdata[112]);
- drugInfo[playerid][dgMaconha] = strval(pdata[113]);
- drugInfo[playerid][dgOpio] = strval(pdata[114]);
- drugInfo[playerid][dgCrack] = strval(pdata[115]);
- drugInfo[playerid][dgMeth] = strval(pdata[116]);
- drugInfo[playerid][dgHeroina] = strval(pdata[117]);
- drugInfo[playerid][dgHaxixe] = strval(pdata[118]);
- PlayerInfo[playerid][pPcarkey2] = strval(pdata[119]);
- PlayerInfo[playerid][pTrabalhado] = strval(pdata[120]);
- PlayerInfo[playerid][pPartes] = strval(pdata[121]);
- //PlayerInfo[playerid][pPcarkey3] = strval(field[122]);
- //printf("Player %s, Helper:%d, NMuted:%d", playername, PlayerInfo[playerid][pHelper], PlayerInfo[playerid][pNMuted]);
- mysql_free_result();
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement