01.12.2012, 03:12
Well, I got problem saving nickname in database for some reason
everythings saved.
but nickname not.
NOTE: UserName = VARCHAR(24)
pawn Код:
new query[200], IP[16];
GetPlayerIp(playerid, IP, 16);
format(query, sizeof(query), "INSERT INTO accounts (UserName, Password,kills, deaths, Rank, Level, Operator, TagAllowed, dRank, Score, PrestigeWeaponID1,PrestigeWeaponID2,PrestigeWeaponID3,PrestigeWeaponID4) VALUES('%s', SHA1('%s'), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0)", PlayerName2(playerid), passwordstring);
mysql_query(query);
format(query, sizeof(query), "INSERT INTO accounts (CapturedZones,PistolSkills,SicPistolSkill,DeserteagleSkill,Shotgun,CombatShotgun,UziTec,Mp5,ak47,m4,Sniper,LastPromotionsDay,LastPromotionsMonth,LastPromotionsYear) VALUES(0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,0,0)");
mysql_query(query);
format(query, sizeof(query), "INSERT INTO accounts (HiredDay, HiredMonth, HiredYear, CM, SiM, Money, IP) VALUES(0, 0, 0, 0, 0, 0,'%s')",IP);
mysql_query(query);
//We do not need to store or free a result as it
//is not a select statement. We can now send the
//client a registration success message and set the
//Login variable to 1.
SendClientMessage(playerid, -1, "You have been registered on this server!");
PlayerInfo[playerid][LoggedIn] = 1;
but nickname not.
NOTE: UserName = VARCHAR(24)