Playerdata doesn't load correcly
#1

PHP код:
LoadPlayerData(playerid)
{
    
clearPlayerChat(playerid);
    new 
Data[2048],Field[258],idx;
    
mysql_queryF("SELECT * FROM `Accounts` WHERE `Username` = '%s' LIMIT 1"GetName(playerid));
    
mysql_store_result();
    if(
mysql_num_rows() == 1){
        
mysql_fetch_rowEx(Data);
        print(
Data);
        
Field strtukDataidx'|' );
        for(new 
0121s++)
        {
            switch(
s)
            {
                case 
0Player[playerid][UserID] = strval(Field);
                case 
2strmid(Player[playerid][Password],Field,0,strlen(Field),129);
                case 
3strmid(Player[playerid][LastIP],Field,0,strlen(Field),26);
                case 
4Player[playerid][Adminlevel] = strval(Field);
                case 
5Player[playerid][Money] = strval(Field);
                case 
6Player[playerid][RegTime] = strval(Field);
                case 
7Player[playerid][LastOn] = strval(Field);
                case 
8Player[playerid][Level] = strval(Field);
                case 
9Player[playerid][Gender] = strval(Field);
                case 
10Player[playerid][Age] = strval(Field);
                case 
11Player[playerid][Health] = floatstr(Field);
                case 
12Player[playerid][Armour] = floatstr(Field);
                case 
13Player[playerid][Skin] = strval(Field);
                case 
14strmid(Player[playerid][Country],Field,0,strlen(Field),255);
                case 
15Player[playerid][Test] = strval(Field);
                case 
16Player[playerid][Faction] = strval(Field);
                case 
17Player[playerid][FactionRank] = strval(Field);
                case 
18strmid(Player[playerid][FactionRankName],Field,0,strlen(Field),255);
                case 
19strmid(Player[playerid][Suspect], Field0strlen(Field), 255);
                case 
20Player[playerid][Arrest] = strval(Field);
                case 
21Player[playerid][PrisonSelect] = strval(Field);
                case 
22Player[playerid][PrisonTime] = strval(Field);
                case 
23Player[playerid][AdminPrisonCount] = strval(Field);
                case 
24Player[playerid][SecondsLoggedIn] = strval(Field);
                case 
25Player[playerid][PlayingHours] = strval(Field);
                case 
26Player[playerid][AdminCode] = strval(Field);
                case 
27Player[playerid][PhoneN] = strval(Field);
                case 
28Player[playerid][PhoneCredit] = strval(Field);
                case 
29Player[playerid][PhoneBook] = strval(Field);
                case 
30Player[playerid][House] = strval(Field);
                case 
31Player[playerid][Hotel] = strval(Field);
                case 
32Player[playerid][Hospitalized] = strval(Field);
                case 
33Player[playerid][OnDuty] = strval(Field);
                case 
34Player[playerid][DutyClothes] = strval(Field);
                case 
35Player[playerid][LastSkin] = strval(Field);
                case 
36Player[playerid][LastX] = floatstr(Field);
                case 
37Player[playerid][LastY] = floatstr(Field);
                case 
38Player[playerid][LastZ] = floatstr(Field);
                case 
39Player[playerid][LastA] = floatstr(Field);
                case 
40Player[playerid][LastInt] = strval(Field);
                case 
41Player[playerid][LastWorld] = strval(Field);
                case 
42Player[playerid][InFactionHQ] = strval(Field);
                case 
43Player[playerid][InHouse] = strval(Field);
                case 
44Player[playerid][Helper] = strval(Field);
                case 
45Player[playerid][Moderator] = strval(Field);
                case 
46strmid(Player[playerid][BankPincode],Field,0,strlen(Field),5);
                case 
47Player[playerid][BankNumber] = strval(Field);
                case 
48Player[playerid][BankMoney] = strval(Field);
                case 
49Player[playerid][ExperiencePoints] = strval(Field);
                case 
50Player[playerid][ExperiencePointsNeeded] = strval(Field);
                case 
51Player[playerid][Coins] = strval(Field);
                case 
52Player[playerid][WalkieTalkie] = strval(Field);
                case 
53Player[playerid][WalkieFrequency] = strval(Field);
                case 
54Player[playerid][HasMask] = strval(Field);
                case 
55Player[playerid][Banned] = strval(Field);
                case 
56Player[playerid][Bans] = strval(Field);
                case 
57Player[playerid][Kicks] = strval(Field);
                case 
58Player[playerid][WeaponSlot0] = strval(Field);
                case 
59Player[playerid][WeaponSlot1] = strval(Field);
                case 
60Player[playerid][WeaponSlot2] = strval(Field);
                case 
61Player[playerid][WeaponSlot3] = strval(Field);
                case 
62Player[playerid][WeaponSlot4] = strval(Field);
                case 
63Player[playerid][WeaponSlot5] = strval(Field);
                case 
64Player[playerid][WeaponSlot6] = strval(Field);
                case 
65Player[playerid][WeaponSlot7] = strval(Field);
                case 
66Player[playerid][WeaponSlot8] = strval(Field);
                case 
67Player[playerid][WeaponSlot9] = strval(Field);
                case 
68Player[playerid][WeaponSlot10] = strval(Field);
                case 
69Player[playerid][WeaponSlot11] = strval(Field);
                case 
70Player[playerid][WeaponSlot0Ammo] = strval(Field);
                case 
71Player[playerid][WeaponSlot1Ammo] = strval(Field);
                case 
72Player[playerid][WeaponSlot2Ammo] = strval(Field);
                case 
73Player[playerid][WeaponSlot3Ammo] = strval(Field);
                case 
74Player[playerid][WeaponSlot4Ammo] = strval(Field);
                case 
75Player[playerid][WeaponSlot5Ammo] = strval(Field);
                case 
76Player[playerid][WeaponSlot6Ammo] = strval(Field);
                case 
77Player[playerid][WeaponSlot7Ammo] = strval(Field);
                case 
78Player[playerid][WeaponSlot8Ammo] = strval(Field);
                case 
79Player[playerid][WeaponSlot9Ammo] = strval(Field);
                case 
80Player[playerid][WeaponSlot10Ammo] = strval(Field);
                case 
81Player[playerid][WeaponSlot11Ammo] = strval(Field);
                case 
82Player[playerid][DutyWeaponSlot0] = strval(Field);
                case 
83Player[playerid][DutyWeaponSlot1] = strval(Field);
                case 
84Player[playerid][DutyWeaponSlot2] = strval(Field);
                case 
85Player[playerid][DutyWeaponSlot3] = strval(Field);
                case 
86Player[playerid][DutyWeaponSlot4] = strval(Field);
                case 
87Player[playerid][DutyWeaponSlot5] = strval(Field);
                case 
88Player[playerid][DutyWeaponSlot6] = strval(Field);
                case 
89Player[playerid][DutyWeaponSlot7] = strval(Field);
                case 
90Player[playerid][DutyWeaponSlot8] = strval(Field);
                case 
91Player[playerid][DutyWeaponSlot9] = strval(Field);
                case 
92Player[playerid][DutyWeaponSlot10] = strval(Field);
                case 
93Player[playerid][DutyWeaponSlot11] = strval(Field);
                case 
94Player[playerid][DutyWeaponSlot0Ammo] = strval(Field);
                case 
95Player[playerid][DutyWeaponSlot1Ammo] = strval(Field);
                case 
96Player[playerid][DutyWeaponSlot2Ammo] = strval(Field);
                case 
97Player[playerid][DutyWeaponSlot3Ammo] = strval(Field);
                case 
98Player[playerid][DutyWeaponSlot4Ammo] = strval(Field);
                case 
99Player[playerid][DutyWeaponSlot5Ammo] = strval(Field);
                case 
100Player[playerid][DutyWeaponSlot6Ammo] = strval(Field);
                case 
101Player[playerid][DutyWeaponSlot7Ammo] = strval(Field);
                case 
102Player[playerid][DutyWeaponSlot8Ammo] = strval(Field);
                case 
103Player[playerid][DutyWeaponSlot9Ammo] = strval(Field);
                case 
104Player[playerid][DutyWeaponSlot10Ammo] = strval(Field);
                case 
105Player[playerid][DutyWeaponSlot11Ammo] = strval(Field);
                case 
106Player[playerid][AntiCheatExemption] = strval(Field);
                case 
107strmid(Player[playerid][Email],Field,0,strlen(Field),128);
                case 
108Player[playerid][Warns] = strval(Field);
                case 
109Player[playerid][Badge] = strval(Field);
                case 
110strmid(Player[playerid][SecretWord],Field,0,strlen(Field),128);
                case 
111Player[playerid][DisconnectReason] = strval(Field);
                case 
112Player[playerid][Business] = strval(Field);
                case 
113Player[playerid][FightStyle] = strval(Field);
                case 
114Player[playerid][SpawnedPersonalCar] = strval(Field);
                case 
115Player[playerid][DRIVINGLC] = strval(Field);
                case 
116Player[playerid][FIREARMSLC] = strval(Field);
                case 
117Player[playerid][BOATLC] = strval(Field);
                case 
118Player[playerid][BIKELC] = strval(Field);
            }
            
Field strtukDataidx'|' );
        }
        
clearPlayerChat(playerid);
        
SPD(playeridDIALOG_AUTHENTICATION);
        
TextDrawHideForPlayer(playeridText:LoadingTD);
        
//printf("%s",Player[playerid][SecretWord]);
        //printf("%s",Player[playerid][LastIP]);
        //printf("%s",PlayerConnectedIP[playerid]);
    
}else if(mysql_num_rows() == 0){
        
clearPlayerChat(playerid);
        new 
playernamesplit[3][MAX_PLAYER_NAME], Name[MAX_PLAYER_NAME];
        
GetPlayerName(playeridNamesizeof(Name));
        
split2(Nameplayernamesplit'_');
        if (!
strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
         {
              
KickWithMessage(playeridCOLOR_WHITE"Unfortunately, your name is not in the proper format! Please use the format of "#COL_EMB_LIGHTBLUE"\"Firstname_Lastname\""#COL_EMB_WHITE".");
        
}
        else
        {
            
SPD(playeridDIALOG_REGISTER);
            
TextDrawHideForPlayer(playeridText:LoadingTD);
        }
    }
    
mysql_free_result();

PHP код:
  `UserIDint(11NOT NULL,
  `
Usernamevarchar(255) DEFAULT NULL,
  `
Passwordvarchar(129) DEFAULT NULL,
  `
LastIPvarchar(16NOT NULL DEFAULT '-1',
  `
Adminlevelint(4NOT NULL,
  `
Moneyint(10NOT NULL,
  `
RegTimeint(20NOT NULL,
  `
LastOnint(20NOT NULL,
  `
Levelint(4NOT NULL,
  `
Genderint(11NOT NULL,
  `
Ageint(3NOT NULL,
  `
Healthfloat NOT NULL,
  `
Armourfloat NOT NULL,
  `
Skinint(3NOT NULL,
  `
Countryvarchar(255NOT NULL,
  `
Testint(11NOT NULL DEFAULT '0',
  `
Factionint(11NOT NULL,
  `
FactionRankint(11NOT NULL,
  `
FactionRankNamevarchar(255NOT NULL,
  `
Suspectvarchar(255NOT NULL,
  `
Arrestint(11NOT NULL,
  `
PrisonSelectint(6NOT NULL DEFAULT '0',
  `
PrisonTimeint(6NOT NULL DEFAULT '0',
  `
AdminPrisonCountint(11NOT NULL DEFAULT '0',
  `
SecondsLoggedInint(11NOT NULL,
  `
PlayingHoursint(11NOT NULL,
  `
AdminCodeint(255NOT NULL,
  `
PhoneNint(6NOT NULL,
  `
PhoneCreditint(11NOT NULL,
  `
PhoneBookint(11NOT NULL DEFAULT '0',
  `
Houseint(11NOT NULL DEFAULT '0',
  `
Hotelint(11NOT NULL DEFAULT '0',
  `
Hospitalizedint(11NOT NULL DEFAULT '0',
  `
OnDutyint(11NOT NULL DEFAULT '0',
  `
DutyClothesint(11NOT NULL DEFAULT '0',
  `
LastSkinint(11NOT NULL,
  `
LastXfloat NOT NULL,
  `
LastYfloat NOT NULL,
  `
LastZfloat NOT NULL,
  `
LastAfloat NOT NULL,
  `
LastIntint(11NOT NULL,
  `
LastWorldint(11NOT NULL,
  `
InFactionHQint(11NOT NULL,
  `
InHouseint(11NOT NULL,
  `
Helperint(11NOT NULL DEFAULT '0',
  `
Moderatorint(11NOT NULL DEFAULT '0',
  `
BankPincodevarchar(5) DEFAULT '0',
  `
BankNumberint(11NOT NULL DEFAULT '0',
  `
BankMoneyint(11NOT NULL DEFAULT '0',
  `
ExperiencePointsint(11NOT NULL,
  `
ExperiencePointsNeededint(11NOT NULL DEFAULT '8',
  `
Coinsint(11NOT NULL DEFAULT '0',
  `
WalkieTalkieint(11NOT NULL DEFAULT '0',
  `
WalkieFrequencyint(11NOT NULL DEFAULT '0',
  `
HasMaskint(11NOT NULL DEFAULT '0',
  `
Bannedint(11NOT NULL DEFAULT '0',
  `
Bansint(11NOT NULL DEFAULT '0',
  `
Kicksint(11) DEFAULT '0',
  `
WeaponSlot0int(11NOT NULL DEFAULT '0',
  `
WeaponSlot1int(11NOT NULL DEFAULT '0',
  `
WeaponSlot2int(11NOT NULL DEFAULT '0',
  `
WeaponSlot3int(11NOT NULL DEFAULT '0',
  `
WeaponSlot4int(11NOT NULL DEFAULT '0',
  `
WeaponSlot5int(11NOT NULL DEFAULT '0',
  `
WeaponSlot6int(11NOT NULL DEFAULT '0',
  `
WeaponSlot7int(11NOT NULL DEFAULT '0',
  `
WeaponSlot8int(11NOT NULL DEFAULT '0',
  `
WeaponSlot9int(11NOT NULL DEFAULT '0',
  `
WeaponSlot10int(11NOT NULL DEFAULT '0',
  `
WeaponSlot11int(11NOT NULL DEFAULT '0',
  `
WeaponSlot0Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot1Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot2Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot3Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot4Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot5Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot6Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot7Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot8Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot9Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot10Ammoint(11NOT NULL DEFAULT '0',
  `
WeaponSlot11Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot0int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot1int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot2int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot3int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot4int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot5int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot6int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot7int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot8int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot9int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot10int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot11int(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot0Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot1Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot2Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot3Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot4Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot5Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot6Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot7Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot8Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot9Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot10Ammoint(11NOT NULL DEFAULT '0',
  `
DutyWeaponSlot11Ammoint(11NOT NULL DEFAULT '0',
  `
AntiCheatExemptionint(11NOT NULL DEFAULT '0',
  `
Emailvarchar(255NOT NULL,
  `
Warnsint(11NOT NULL DEFAULT '0',
  `
Badgeint(11NOT NULL DEFAULT '0',
  `
SecretWordvarchar(128NOT NULL,
  `
DisconnectReasonint(11NOT NULL,
  `
Businessint(11NOT NULL DEFAULT '-1',
  `
FightStyleint(11NOT NULL DEFAULT '0',
  `
SpawnedPersonalCarint(11NOT NULL DEFAULT '-1',
  `
DRIVINGLCint(11NOT NULL DEFAULT '0',
  `
FIREARMSLCint(11NOT NULL DEFAULT '0',
  `
BOATLCint(11NOT NULL DEFAULT '0',
  `
BIKELCint(11NOT NULL DEFAULT '0',
  `
LastOnDatevarchar(255NOT NULL,
  `
Offlineint(11NOT NULL DEFAULT '1'
ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
--
-- 
Dumping data for table `accounts`
--
INSERT INTO `accounts` (`UserID`, `Username`, `Password`, `LastIP`, `Adminlevel`, `Money`, `RegTime`, `LastOn`, `Level`, `Gender`, `Age`, `Health`, `Armour`, `Skin`, `Country`, `Test`, `Faction`, `FactionRank`, `FactionRankName`, `Suspect`, `Arrest`, `PrisonSelect`, `PrisonTime`, `AdminPrisonCount`, `SecondsLoggedIn`, `PlayingHours`, `AdminCode`, `PhoneN`, `PhoneCredit`, `PhoneBook`, `House`, `Hotel`, `Hospitalized`, `OnDuty`, `DutyClothes`, `LastSkin`, `LastX`, `LastY`, `LastZ`, `LastA`, `LastInt`, `LastWorld`, `InFactionHQ`, `InHouse`, `Helper`, `Moderator`, `BankPincode`, `BankNumber`, `BankMoney`, `ExperiencePoints`, `ExperiencePointsNeeded`, `Coins`, `WalkieTalkie`, `WalkieFrequency`, `HasMask`, `Banned`, `Bans`, `Kicks`, `WeaponSlot0`, `WeaponSlot1`, `WeaponSlot2`, `WeaponSlot3`, `WeaponSlot4`, `WeaponSlot5`, `WeaponSlot6`, `WeaponSlot7`, `WeaponSlot8`, `WeaponSlot9`, `WeaponSlot10`, `WeaponSlot11`, `WeaponSlot0Ammo`, `WeaponSlot1Ammo`, `WeaponSlot2Ammo`, `WeaponSlot3Ammo`, `WeaponSlot4Ammo`, `WeaponSlot5Ammo`, `WeaponSlot6Ammo`, `WeaponSlot7Ammo`, `WeaponSlot8Ammo`, `WeaponSlot9Ammo`, `WeaponSlot10Ammo`, `WeaponSlot11Ammo`, `DutyWeaponSlot0`, `DutyWeaponSlot1`, `DutyWeaponSlot2`, `DutyWeaponSlot3`, `DutyWeaponSlot4`, `DutyWeaponSlot5`, `DutyWeaponSlot6`, `DutyWeaponSlot7`, `DutyWeaponSlot8`, `DutyWeaponSlot9`, `DutyWeaponSlot10`, `DutyWeaponSlot11`, `DutyWeaponSlot0Ammo`, `DutyWeaponSlot1Ammo`, `DutyWeaponSlot2Ammo`, `DutyWeaponSlot3Ammo`, `DutyWeaponSlot4Ammo`, `DutyWeaponSlot5Ammo`, `DutyWeaponSlot6Ammo`, `DutyWeaponSlot7Ammo`, `DutyWeaponSlot8Ammo`, `DutyWeaponSlot9Ammo`, `DutyWeaponSlot10Ammo`, `DutyWeaponSlot11Ammo`, `AntiCheatExemption`, `Email`, `Warns`, `Badge`, `SecretWord`, `DisconnectReason`, `Business`, `FightStyle`, `SpawnedPersonalCar`, `DRIVINGSLC`, `FIREARMSLC`, `BOATLC`, `BIKELC`, `LastOnDate`, `Offline`); 
Its loading not like it should be, Everthing will be messed up,,
Reply


Messages In This Thread
Playerdata doesn't load correcly - by lulo356 - 17.01.2016, 03:46
Re: Playerdata doesn't load correcly - by Riddick94 - 17.01.2016, 10:07
Re: Playerdata doesn't load correcly - by lulo356 - 18.01.2016, 23:41
Re: Playerdata doesn't load correcly - by Pottus - 19.01.2016, 00:33
Re: Playerdata doesn't load correcly - by Prokill911 - 19.01.2016, 00:58

Forum Jump:


Users browsing this thread: 1 Guest(s)