Ayuda MySQL RC7 BlueG
#2

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[])
{

}
Reply


Messages In This Thread
Ayuda MySQL R7 BlueG - by oOFotherOo - 15.05.2012, 23:31
Respuesta: Ayuda MySQL RC7 BlueG - by Jovanny - 16.05.2012, 02:49
Respuesta: Ayuda MySQL RC7 BlueG - by oOFotherOo - 16.05.2012, 12:24
Respuesta: Ayuda MySQL RC7 BlueG - by Jovanny - 16.05.2012, 16:49
Respuesta: Ayuda MySQL RC7 BlueG - by oOFotherOo - 17.05.2012, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)