PDA

View Full Version : news


audriuxxx
12/06/2013, 09:02 PM
Hi,

I want to ask, i have like that:

new ALLPLAYERS = ReturnUserCount( );

stock ReturnUserCount()
{
mysql_free_result( );
mysql_query("SELECT Vardas FROM players");
mysql_store_result();
new users = mysql_num_rows();
mysql_free_result();
return users;
}

When i use this in my code, like in command

new ALLPLAYERS = ReturnUserCount( );

Does, returnusercount will be called, or i have to use ALLPLAYERS in anywhere, then all scripts in that stock will be called?

park4bmx
12/06/2013, 09:36 PM
you cant do that, it will probably crash!
you need to define the sizeof it as it has to hold a string also you need to use it under On-Gm/Fs-Init
to have the effect you want!

Scenario
12/06/2013, 09:55 PM
Look into the COUNT MySQL query.