08.05.2013, 13:40
is it not good?
0,0,0 Their position is created
0,0,0 Their position is created
Код:
CREATE TABLE IF NOT EXISTS `cp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `x` float NOT NULL, `y` float NOT NULL, `z` float NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2;
Код:
stock NewCP() { format(g_szQuery, sizeof g_szQuery, "SELECT * FROM cp ORDER BY RAND() LIMIT 1;"); mysql_function_query(1, g_szQuery, true, "OnNewCP", ""); } forward OnNewCP(); public OnNewCP() { new rows, fields, posx[10], posy[10], posz[10]; cache_get_data(rows, fields); if(rows) { cache_get_row(0, 1, posx); cache_get_row(0, 2, posy); cache_get_row(0, 3, posz); SendFormatMessage(-1,RED,"asd: %f, %f , %f",posx,posy,posz); } }