mysql random cp
#7

is it not good?
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);
                }
            }
Reply


Messages In This Thread
mysql random cp - by David94 - 07.05.2013, 08:51
Re: mysql random cp - by Vince - 07.05.2013, 09:43
Re: mysql random cp - by newbienoob - 07.05.2013, 09:50
Re: mysql random cp - by PaulDinam - 07.05.2013, 10:19
Re: mysql random cp - by David94 - 07.05.2013, 10:37
Re: mysql random cp - by PaulDinam - 07.05.2013, 11:09
Re: mysql random cp - by David94 - 08.05.2013, 13:40
Re: mysql random cp - by David94 - 09.05.2013, 10:15
Re: mysql random cp - by David94 - 25.05.2013, 13:34
Re: mysql random cp - by kurta999 - 26.05.2013, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)