loading problem
#1

PHP Code:
stock SavePlayerData(playerid)
{
    if(
Authenticated[playerid] == 1)
    {
        new
            
query[2000],
            
FloatpHealth,
            
FloatpArmour;//don't forget to change the "2" to "5" when enabling the last pos
        
GetPlayerHealth(playeridpHealth);
        
GetPlayerArmour(playeridpArmour);
        
format(querysizeof(query), "UPDATE `Accounts` SET `Adminlevel` = %d, `Money` = %d, `Level` = %d, `LastOn` = %d, `Health` = %f, `Armour` = %f, `Skin` = %d, `Gender` = %d, `LastIP` = '%s', `Age` = %d, `Country` = '%s', `Test` = %d, `Faction` = %d, `FactionRank` = %d, `FactionRankName` = '%s', ",
            
Player[playerid][Adminlevel],
            
GetPlayerCash(playerid),
            
Player[playerid][Level],
            
Player[playerid][LastOn],
            
pHealth,
            
pArmour,
            
Player[playerid][Skin],
            
Player[playerid][Gender],
            
PlayerConnectedIP[playerid],
            
Player[playerid][Age],
            
Player[playerid][Country],
            
Player[playerid][Test],
            
Player[playerid][Faction],
            
Player[playerid][FactionRank],
            
Player[playerid][FactionRankName]);
        
format(querysizeof(query), "%s`PrisonSelect` = %d, `PrisonTime` = %d, `AdminPrisonCount` = %d, `SecondsLoggedIn` = %d, `PlayingHours` = %d, `AdminCode` = %d, `PhoneN` = %d, `PhoneCredit` = %d, `PhoneBook` = %d, `House` = %d, `Hotel` = %d, `Hospitalized` = %d, ",
            
query,
            
Player[playerid][PrisonSelect],
            
Player[playerid][PrisonTime],
            
Player[playerid][AdminPrisonCount],
            
Player[playerid][SecondsLoggedIn],
            
Player[playerid][PlayingHours],
            
Player[playerid][AdminCode],
            
Player[playerid][PhoneN],
            
Player[playerid][PhoneCredit],
            
Player[playerid][PhoneBook],
            
Player[playerid][House],
            
Player[playerid][Hotel],
            
Player[playerid][Hospitalized]);
        
format(querysizeof(query), "%s`OnDuty` = %d, `DutyClothes` = %d, `LastSkin` = %d, `LastX` = %f, `LastY` = %f, `LastZ` = %f, `LastA` = %f, `LastInt` = %d, `LastWorld` = %d, `InFactionHQ` = %d, `InHouse` = %d, ",
            
query,
            
0,
            
Player[playerid][DutyClothes],
            
Player[playerid][LastSkin],
            
Player[playerid][LastX],
            
Player[playerid][LastY],
            
Player[playerid][LastZ],
            
Player[playerid][LastA],
            
Player[playerid][LastInt],
            
Player[playerid][LastWorld],
            
Player[playerid][InFactionHQ],
            
Player[playerid][InHouse]);
        
format(querysizeof(query), "%s`Helper` = %d, `Moderator` = %d, `BankPincode` = '%s', `BankNumber` = %d, `BankMoney` = %d, `ExperiencePoints` = %d, `ExperiencePointsNeeded` = %d, `Coins` = %d, `WalkieTalkie` = %d, `WalkieFrequency` = %d, ",
            
query,
            
Player[playerid][Helper],
            
Player[playerid][Moderator],
            
Player[playerid][BankPincode],
            
Player[playerid][BankNumber],
            
Player[playerid][BankMoney],
            
Player[playerid][ExperiencePoints],
            
Player[playerid][ExperiencePointsNeeded],
            
Player[playerid][Coins],
            
Player[playerid][WalkieTalkie],
            
Player[playerid][WalkieFrequency]);
        
format(querysizeof(query), "%s`WeaponSlot0` = %d, `WeaponSlot1` = %d, `WeaponSlot2` = %d, `WeaponSlot3` = %d, `WeaponSlot4` = %d, `WeaponSlot5` = %d, `WeaponSlot6` = %d, `WeaponSlot7` = %d, `WeaponSlot8` = %d, `WeaponSlot9` = %d, `WeaponSlot10` = %d, `WeaponSlot11` = %d, ",
            
query,
            
Player[playerid][WeaponSlot0],
            
Player[playerid][WeaponSlot1],
            
Player[playerid][WeaponSlot2],
            
Player[playerid][WeaponSlot3],
            
Player[playerid][WeaponSlot4],
            
Player[playerid][WeaponSlot5],
            
Player[playerid][WeaponSlot6],
            
Player[playerid][WeaponSlot7],
            
Player[playerid][WeaponSlot8],
            
Player[playerid][WeaponSlot9],
            
Player[playerid][WeaponSlot10],
            
Player[playerid][WeaponSlot11]);
        
format(querysizeof(query), "%s`WeaponSlot0Ammo` = %d, `WeaponSlot1Ammo` = %d, `WeaponSlot2Ammo` = %d, `WeaponSlot3Ammo` = %d, `WeaponSlot4Ammo` = %d, `WeaponSlot5Ammo` = %d, `WeaponSlot6Ammo` = %d, `WeaponSlot7Ammo` = %d, `WeaponSlot8Ammo` = %d, `WeaponSlot9Ammo` = %d, `WeaponSlot10Ammo` = %d, `WeaponSlot11Ammo` = %d WHERE `Username` = '%s'",
            
query,
            
Player[playerid][WeaponSlot0Ammo],
            
Player[playerid][WeaponSlot1Ammo],
            
Player[playerid][WeaponSlot2Ammo],
            
Player[playerid][WeaponSlot3Ammo],
            
Player[playerid][WeaponSlot4Ammo],
            
Player[playerid][WeaponSlot5Ammo],
            
Player[playerid][WeaponSlot6Ammo],
            
Player[playerid][WeaponSlot7Ammo],
            
Player[playerid][WeaponSlot8Ammo],
            
Player[playerid][WeaponSlot9Ammo],
            
Player[playerid][WeaponSlot10Ammo],
            
Player[playerid][WeaponSlot11Ammo],
            
GetName(playerid));
        
mysql_query(query);
        
format(querysizeof(query), "UPDATE `Accounts` SET `DutyWeaponSlot0` = %d, `DutyWeaponSlot1` = %d, `DutyWeaponSlot2` = %d, `DutyWeaponSlot3` = %d, `DutyWeaponSlot4` = %d, `DutyWeaponSlot5` = %d, `DutyWeaponSlot6` = %d, `DutyWeaponSlot7` = %d, `DutyWeaponSlot8` = %d, `DutyWeaponSlot9` = %d, `DutyWeaponSlot10` = %d, `DutyWeaponSlot11` = %d, ",
            
Player[playerid][DutyWeaponSlot0],
            
Player[playerid][DutyWeaponSlot1],
            
Player[playerid][DutyWeaponSlot2],
            
Player[playerid][DutyWeaponSlot3],
            
Player[playerid][DutyWeaponSlot4],
            
Player[playerid][DutyWeaponSlot5],
            
Player[playerid][DutyWeaponSlot6],
            
Player[playerid][DutyWeaponSlot7],
            
Player[playerid][DutyWeaponSlot8],
            
Player[playerid][DutyWeaponSlot9],
            
Player[playerid][DutyWeaponSlot10],
            
Player[playerid][DutyWeaponSlot11]);
        
format(querysizeof(query), "%s`DutyWeaponSlot0Ammo` = %d, `DutyWeaponSlot1Ammo` = %d, `DutyWeaponSlot2Ammo` = %d, `DutyWeaponSlot3Ammo` = %d, `DutyWeaponSlot4Ammo` = %d, `DutyWeaponSlot5Ammo` = %d, `DutyWeaponSlot6Ammo` = %d, `DutyWeaponSlot7Ammo` = %d, `DutyWeaponSlot8Ammo` = %d, `DutyWeaponSlot9Ammo` = %d, `DutyWeaponSlot10Ammo` = %d, `DutyWeaponSlot11Ammo` = %d, ",
            
query,
            
Player[playerid][DutyWeaponSlot0Ammo],
            
Player[playerid][DutyWeaponSlot1Ammo],
            
Player[playerid][DutyWeaponSlot2Ammo],
            
Player[playerid][DutyWeaponSlot3Ammo],
            
Player[playerid][DutyWeaponSlot4Ammo],
            
Player[playerid][DutyWeaponSlot5Ammo],
            
Player[playerid][DutyWeaponSlot6Ammo],
            
Player[playerid][DutyWeaponSlot7Ammo],
            
Player[playerid][DutyWeaponSlot8Ammo],
            
Player[playerid][DutyWeaponSlot9Ammo],
            
Player[playerid][DutyWeaponSlot10Ammo],
            
Player[playerid][DutyWeaponSlot11Ammo]);
        
format(querysizeof(query), "%s`AntiCheatExemption` = %d, `Bans` = %d, `Kicks` = %d, `LastOnDate` = '%s', `Banned` = %d, `Email` = '%s', `Warns` = %d, `Badge` = %d, `Offline` = %d, `SecretWord` = '%s', `DisconnectReason` = %d, `Business` = %d, `FightStyle` = %d, `SpawnedPersonalCar` = %d WHERE `Username` = '%s'",
            
query,
            
Player[playerid][AntiCheatExemption],
            
Player[playerid][Bans],
            
Player[playerid][Kicks],
            
date(gettime()+36001),
            
Player[playerid][Banned],
            
Player[playerid][Email],
            
Player[playerid][Warns],
            
Player[playerid][Badge],
            
Player[playerid][Offline],
            
Player[playerid][SecretWord],
            
Player[playerid][DisconnectReason],
            
Player[playerid][Business],
            
Player[playerid][FightStyle],
            
Player[playerid][SpawnedPersonalCar],
            
GetName(playerid));
        
mysql_query(query);
    }
    return 
1;

It saves correct,

PHP Code:
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);
            }
            
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();

It loads as sh*t.... Some lines are messed up...

MYSQL Server
UserID int(11)
Username varchar(255)
Password varchar(129)
LastIP varchar(16)
Adminlevel int(4)
Money int(10)
RegTime int(20)
LastOn int(20)
Level int(4)
Gender int(11)
Age int(3)
Health float
Armour float
Skin int(3)
Country varchar(255)
Test int(11)
Faction int(11)
FactionRank int(11)
FactionRankName varchar(255)
PrisonSelect int(6)
PrisonTime int(6)
AdminPrisonCount int(11)
SecondsLoggedIn int(11)
PlayingHours int(11)
AdminCode int(255)
PhoneN int(6)
PhoneCredit int(11)
PhoneBook int(11)
House int(11)
Hotel int(11)
Hospitalized int(11)
OnDuty int(11)
DutyClothes int(11)
LastSkin int(11)
LastX float
LastY float
LastZ float
LastA float
LastInt int(11)
LastWorld int(11)
InFactionHQ int(11)
InHouse int(11)
Helper int(11)
Moderator int(11)
BankPincode varchar(5)
BankNumber int(11)
BankMoney int(11)
ExperiencePoints int(11)
ExperiencePointsNeeded int(11)
Coins int(11)
WalkieTalkie int(11)
WalkieFrequency int(11)
HasMask int(11)
Banned int(11)
Bans int(11)
Kicks int(11)
WeaponSlot0 int(11)
WeaponSlot1 int(11)
WeaponSlot2 int(11)
WeaponSlot3 int(11)
WeaponSlot4 int(11)
WeaponSlot5 int(11)
WeaponSlot6 int(11)
WeaponSlot7 int(11)
WeaponSlot8 int(11)
WeaponSlot9 int(11)
WeaponSlot10 int(11)
WeaponSlot11 int(11)
WeaponSlot0Ammo int(11)
WeaponSlot1Ammo int(11)
WeaponSlot2Ammo int(11)
WeaponSlot3Ammo int(11)
WeaponSlot4Ammo int(11)
WeaponSlot5Ammo int(11)
WeaponSlot6Ammo int(11)
WeaponSlot7Ammo int(11)
WeaponSlot8Ammo int(11)
WeaponSlot9Ammo int(11)
WeaponSlot10Ammo int(11)
WeaponSlot11Ammo int(11)
DutyWeaponSlot0 int(11)
DutyWeaponSlot1 int(11)
DutyWeaponSlot2 int(11)
DutyWeaponSlot3 int(11)
DutyWeaponSlot4 int(11)
DutyWeaponSlot5 int(11)
DutyWeaponSlot6 int(11)
DutyWeaponSlot7 int(11)
DutyWeaponSlot8 int(11)
DutyWeaponSlot9 int(11)
DutyWeaponSlot10 int(11)
DutyWeaponSlot11 int(11)
DutyWeaponSlot0Ammo int(11)
DutyWeaponSlot1Ammo int(11)
DutyWeaponSlot2Ammo int(11)
DutyWeaponSlot3Ammo int(11)
DutyWeaponSlot4Ammo int(11)
DutyWeaponSlot5Ammo int(11)
DutyWeaponSlot6Ammo int(11)
DutyWeaponSlot7Ammo int(11)
DutyWeaponSlot8Ammo int(11)
DutyWeaponSlot9Ammo int(11)
DutyWeaponSlot10Ammo int(11)
DutyWeaponSlot11Ammo int(11)
AntiCheatExemption int(11)
Email varchar(255)
Warns int(11)
Badge int(11)
LastOnDate varchar(255)
Offline int(11)
SecretWord varchar(12
DisconnectReason int(11)
Business int(11)
FightStyle int(11)
SpawnedPersonalCar int(11)



The server doesnt give any error's so can you tell me why its loading wrong?
Reply
#2

You can see the errors in debug.txt or mysql_debug.txt after u enable the debugging mode according to the plugin u r using
Reply
#3

Quote:
Originally Posted by perfectboy
View Post
You can see the errors in debug.txt or mysql_debug.txt after u enable the debugging mode according to the plugin u r using
As i said, There are no error's
Reply
#4

pawn Code:
LoadPlayerData(playerid)
{
    clearPlayerChat(playerid);
    mysql_queryF("SELECT * FROM `Accounts` WHERE `Username` = '%s' LIMIT 1", GetName(playerid));
    mysql_store_result();
    new fields = mysql_num_fields();
    if(fields)
    {
        new Data[2048], Field[128], s, idx;
        mysql_fetch_rowEx(Data);
        print(Data);
        strcat(Field, strtuk( Data, idx, '|') );
        while(s < fields)
        {
            switch(s)
            {
                // all case here
            }
            s++;
            strcat((Field[0] = EOS, Field), strtuk( Data, idx, '|') );
        }
        clearPlayerChat(playerid);
        SPD(playerid, DIALOG_AUTHENTICATION);
        TextDrawHideForPlayer(playerid, Text:LoadingTD);
        //printf("%s",Player[playerid][SecretWord]);
        //printf("%s",Player[playerid][LastIP]);
        //printf("%s",PlayerConnectedIP[playerid]);
    }
    else
    {
        clearPlayerChat(playerid);
        new playernamesplit[3][MAX_PLAYER_NAME], Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        split2(Name, playernamesplit, '_');

        if(!strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
        {
            KickWithMessage(playerid, COLOR_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(playerid, DIALOG_REGISTER);
            TextDrawHideForPlayer(playerid, Text:LoadingTD);
        }
    }
    mysql_free_result();
}
Reply
#5

Quote:
Originally Posted by Jefff
View Post
pawn Code:
LoadPlayerData(playerid)
{
    clearPlayerChat(playerid);
    mysql_queryF("SELECT * FROM `Accounts` WHERE `Username` = '%s' LIMIT 1", GetName(playerid));
    mysql_store_result();
    new fields = mysql_num_fields();
    if(fields)
    {
        new Data[2048], Field[128], s, idx;
        mysql_fetch_rowEx(Data);
        print(Data);
        strcat(Field, strtuk( Data, idx, '|') );
        while(s < fields)
        {
            switch(s)
            {
                // all case here
            }
            s++;
            strcat((Field[0] = EOS, Field), strtuk( Data, idx, '|') );
        }
        clearPlayerChat(playerid);
        SPD(playerid, DIALOG_AUTHENTICATION);
        TextDrawHideForPlayer(playerid, Text:LoadingTD);
        //printf("%s",Player[playerid][SecretWord]);
        //printf("%s",Player[playerid][LastIP]);
        //printf("%s",PlayerConnectedIP[playerid]);
    }
    else
    {
        clearPlayerChat(playerid);
        new playernamesplit[3][MAX_PLAYER_NAME], Name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Name, sizeof(Name));
        split2(Name, playernamesplit, '_');

        if(!strlen(playernamesplit[0]) || !strlen(playernamesplit[1]))
        {
            KickWithMessage(playerid, COLOR_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(playerid, DIALOG_REGISTER);
            TextDrawHideForPlayer(playerid, Text:LoadingTD);
        }
    }
    mysql_free_result();
}
Now the whole inlog system is bugged, a new player doenst get the tutorial, and old players can't use there password..
Reply
#6

Bump
Reply
#7

bump #2
Reply
#8

Your cases doesn't match with database columns, you got suspect, arrest but in DB is PrisonSelect int(6) and more
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)