16.05.2012, 02:49
(
Последний раз редактировалось Jovanny; 16.05.2012 в 05:15.
)
pawn Код:
new ConnectionHandle;
public OnFilterScriptInit()
{
ConnectionHandle = mysql_connect(SQL_HOST, SQL_USER,SQL_DB, SQL_PASS);
}
stock MySQL_Registro(playerid, passwordstring[])
{
new query[300], pname[24], IP[16];
GetPlayerName(playerid, pname, 24);
GetPlayerIp(playerid, IP, 16);
format(query, 300, "INSERT INTO playerdata (Usuario, Contrasena, Nivel, Dinero, IP) VALUES('%s', SHA1('%s'), 0, 0, '%s')", pname, passwordstring, IP);
mysql_function_query(ConnectionHandle,query, true, "OnQueryFinish", "is", ConnectionHandle, query);
SendClientMessage(playerid, -1, "Usted ha sido registrado en este servidor!");
Logueado[playerid] = 1;
return 1;
}
forward OnQueryFinish(connectionhandle, query[]);
public OnQueryFinish(connectionhandle, query[])
{
}