Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL ^ E_NOTICE);
- include_once('shop.php');
- $db = mysql_connect('localhost','test','7990911qw');
- mysql_select_db('test', $db);
- $result = mysql_query("SELECT * FROM shop_server_rust ORDER BY id DESC LIMIT 1");
- while ($myrow = mysql_fetch_array($result)) {
- $rcon = new CServerRcon('127.0.0.1', 28016, '1212');
- if($rcon->Auth())
- {
- $id = $myrow[id];
- $item = $myrow[title];
- $name = $myrow[username];
- $amount = $myrow[amount];
- if ($rcon->rconCommand("serv.give $name $item $amount")) {
- mysql_query("DELETE FROM shop_server_rust WHERE id='".$id."'");
- echo "'".$name."' Вы успешно купили '".$amount."' штук(и) '".$item."' ";
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement