Mysql r35 help!
#4

Check the wiki for the latest natives and their examples: https://sampwiki.blast.hk/wiki/MySQL/R33 (This is updated for R35 recently by maddinat0r)

pawn Код:
// This is just an example.
stock LoadVehicles()
{
    // Edit the 1 to your connection handle.
    mysql_tquery(1, "SELECT * FROM vehicles", "LoadVehicleMySQL");
}

forward public LoadVehicleMySQL;
public LoadVehicleMySQL()
{
    for(new yy=0; yy < cache_get_row_count(); ++yy)
    {
        cache_get_row(yy, 0, VehicleInfo[id][Model]);
        cache_get_row_float(yy, 1, VehicleInfo[id][Pos][X]);
        cache_get_row_float(yy, 2, VehicleInfo[id][Pos][Y]);
        // This isn't completed yet, now do the rest.
    }
    return true;
}
Reply


Messages In This Thread
Mysql r35 help! - by XxsenchixX - 24.01.2014, 19:13
Re: Mysql r35 help! - by HuSs3n - 24.01.2014, 19:20
Re: Mysql r35 help! - by XxsenchixX - 24.01.2014, 19:22
Re: Mysql r35 help! - by iZN - 24.01.2014, 19:26
Re: Mysql r35 help! - by XxsenchixX - 24.01.2014, 19:27
Re: Mysql r35 help! - by XxsenchixX - 24.01.2014, 19:32
Re: Mysql r35 help! - by HuSs3n - 24.01.2014, 19:45

Forum Jump:


Users browsing this thread: 1 Guest(s)