04.02.2013, 01:17
pawn Код:
stock MySQL_Register(playerid, passwordstring[])
{
PlayerInfo[playerid][pCash] = 200;
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pBank] = 500;
PlayerInfo[playerid][pAdminLevel] = 0;
new query[350], pname[24], IP[15];
GetPlayerName(playerid, pname, 24);
GetPlayerIp(playerid, IP, 15);
format(query, sizeof(query), "INSERT INTO playerdata (Username, Password, Cash, Level, Bank, PosX, PosY, PosZ, PosA, IP, AdminLevel) VALUES('%s', SHA1('%s'), '%d', '%d', '%d', 1295, 183, 20, 97, '%s', '%d')", pname, passwordstring, PlayerInfo[playerid][pCash], PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pBank], IP, PlayerInfo[playerid][pAdminLevel]);
mysql_query(query);
Logged[playerid] = 1;
return 1;
}