MySQL help
#6

Quote:
Originally Posted by ViruZz
Посмотреть сообщение
Here you go

pawn Код:
new query[200], IP[16], playername[MAX_PLAYER_NAME];
    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)", GetPlayerName(playerid, playername, MAX_PLAYER_NAME), 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;
what did you change?
same as PlayerName2(playerid) -.-
Reply


Messages In This Thread
MySQL help - by V_LOPE - 01.12.2012, 03:12
Re: MySQL help - by Jarnu - 01.12.2012, 03:41
Re: MySQL help - by ReneG - 01.12.2012, 04:06
Re: MySQL help - by V_LOPE - 01.12.2012, 04:54
Re: MySQL help - by ViruZz - 01.12.2012, 05:03
Re: MySQL help - by V_LOPE - 01.12.2012, 05:09
Re: MySQL help - by ViruZz - 01.12.2012, 05:10
Re: MySQL help - by V_LOPE - 01.12.2012, 05:20
Re: MySQL help - by V_LOPE - 01.12.2012, 06:56
Re: MySQL help - by Vince - 01.12.2012, 08:50

Forum Jump:


Users browsing this thread: 3 Guest(s)