10.02.2017, 22:05
I have 2 players then the textdraw show the one who have less money than other
PHP код:
stock Topcash()
{
mysql_tquery(mysql ,"SELECT Username,Money FROM players WHERE ID ORDER BY Money LIMIT 1;", "ShowBestCash","");
return true;
}
forward ShowBestCash();
public ShowBestCash()
{
new rows;
cache_get_row_count(rows);
if(rows)
{
new playername[35];
new playermoney;
new str[1303];
cache_get_value_index(0, 0, playername);
cache_get_value_name_int(0,"Money",playermoney);
cache_get_value_index_int(0,1, playermoney);
format(str, sizeof(str), "~b~~h~N~b~~h~e~b~~h~~h~w~b~~h~~h~s~w~:~y~~h~%s~w~ Is the reachest player (~r~%d~r~~h~ cash~w~)~n~~n~", playername, playermoney);
TextDrawSetString(Textdraw7,str);
TextDrawShowForAll(Textdraw7);
}
return 1;
}