06.11.2017, 19:05
Hello guys.Im trying to get my register system working with MySql but when a player register,stats are not uploading to mysql.Connection is good with MySql,other tables works just fine.
Here is my code:
Function "onplayerregister" gets called since it shows me the registering process.
Any help please?
Thanks
Here is my code:
Код:
public OnPlayerRegister(playerid, password[]) { if(IsPlayerConnected(playerid)) { new string3[32]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); new query[8000]; strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255); format(query, sizeof(query),"INSERT INTO users (`Username`, `Key`, `Level`, `AdminLevel`, `Band`, `PermaBand`, `Warnings`, `LogWarnings`, \ `Disabled`, `DonateRank`, `BanAppealer`, `ShopTech`, `VehModder`, `VehNos`, `CarInsurance`, `Undercover`, `TogReports`, `Radio`, `RadioFreq`, \ `UpgradePoints`, `ConnectedTime`) VALUES (`%s`, '%s', %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d) ", playername3,//1 PlayerInfo[playerid][pKey], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pBanned], PlayerInfo[playerid][pPermaBanned], PlayerInfo[playerid][pWarns], PlayerInfo[playerid][pLWarns], PlayerInfo[playerid][pDisabled], PlayerInfo[playerid][pDonateRank], PlayerInfo[playerid][pBanAppealer], PlayerInfo[playerid][pShopTech], PlayerInfo[playerid][pVehMods], PlayerInfo[playerid][pNos], PlayerInfo[playerid][pCarInsurance], PlayerInfo[playerid][pUndercover], PlayerInfo[playerid][pTogReports], PlayerInfo[playerid][pRadio], PlayerInfo[playerid][pRadioFreq], PlayerInfo[playerid][gPupgrade], PlayerInfo[playerid][pConnectTime]);//21 mysql_query(query, THREAD_REGISTER); } return 1; }
Any help please?
Thanks