SHARE
TWEET

Untitled

a guest Sep 18th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(mb_substr($question_text, 0, 6) == "багачи" || mb_substr($question_text, 0, 5) == "money")
  2.     {
  3.         if($peer_id == 2000000005 || $peer_id == 2000000004) {
  4.                
  5.             $result = bd_query($mysql, "SELECT `name`, `money`, `bank` FROM `accounts` WHERE `money` > 3000000 OR `bank` > 3000000 ORDER BY `money` DESC");
  6.             if(!$result->num_rows) {
  7.                 vk_messagesSend($peer_id, "Багачей нет!", 0);
  8.                 return 1;
  9.             }
  10.             $data = array();
  11.             for($idx = 0; $idx < $result->num_rows; $idx++) {
  12.                 $data[] = $result->fetch_assoc();
  13.             }
  14.             $text = "Топ богачей:\n";
  15.             for($idx = 0; $idx < sizeof($data); $idx++) {
  16.                 if($idx > 30) break;
  17.                 $text .= ($idx + 1).". ".$data[$idx]['name']." | Денег на руках: ".$data[$idx]['money']." | Денег в банке: ".$data[$idx]['bank']."\n";
  18.             }
  19.             vk_messagesSend($peer_id, $text,0);
  20.         }
  21.         else vk_messagesSend($peer_id, "Вам команда недоступна!", $message_id);
  22.         return 1;
  23.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top