pawn Code:
stock MySQL_Register(playerid, passwordstring[])
{
new query[200], pname[24], IP[16];
GetPlayerName(playerid, pname, 24);
GetPlayerIp(playerid, IP, 16);
format(query, sizeof(query), "INSERT INTO playerdata (user, password, score, money, IP) VALUES('%s', SHA1('%s'), 0, 0, '%s', 0.0)", pname, passwordstring, IP);
mysql_query(query);
//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!");
Logged[playerid] = 1; //Sets the login variable
return 1;
}