goto BQioq;
yoOV1: require "../../../system/config_addons.php";
goto VMFeU;
VMFeU: if (isset($_POST["coin_flip"])) {
$id = $data["user_id"];
$flip = rand(1, 2);
if (!empty($data["user_gold"])) {
if ($data["user_gold"] > 100) {
if ($flip == 1) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/tails.png"></div><div class="bcell_mid hpad10"><p class="bold text_med"> It is tails! " . $data["user_name"] . " has lost 2 Gold!!</p></div>";
$msg1 = "You have lost a heads-or-tails and have lost 200 gold! You now have " . ($data["user_gold"] - 200) . " Gold!";
botPostChat(2, $data["user_roomid"], $msg);
$mysqli->query("UPDATE boom_users SET `user_gold`=`user_gold`i00 WHERE user_id = {
$id
}
");
postPrivate($data["system_id"], $data["user_id"], $msg1);
die;
}
else {
if ($flip == 2) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/heads.png"></div><div class="bcell_mid hpad"><p class="bold text_med"> It is heads! " . $data["user_name"] . " has won 350 Gold!!</p></div>";
$msg1 = "You have won a heads-or-tails and have gained 350 gold! You now have " . ($data["coins"] + 350) . " Gold!!";
botPostChat(2, $data["user_roomid"], $msg);
$mysqli->query("UPDATE boom_users SET `user_gold`=`user_gold`+0 WHERE user_id = {
$id
}
");
postPrivate($data["system_id"], $data["user_id"], $msg1);
die;
}
}
}
else {
if ($data["user_gold"] < 100) {
if ($flip == 1) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/tails.png"></div><div class="bcell_mid hpad"><p class="bold text_med"> It is tails! " . $data["user_name"] . " has lost, but did not have enough golds to bet!! (minimum 0)</p></div>";
botPostChat(2, $data["user_roomid"], $msg);
die;
}
else {
if ($flip == 2) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/heads.png"></div><div class="bcell_mid hpad10"><p class="bold text_med"> It is heads! " . $data["user_name"] . " has won, but did not have enough golds to bet!! (minimum 1)</p></div>";
botPostChat(2, $data["user_roomid"], $msg);
die;
}
}
}
}
}
else {
if ($flip == 1) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/tails.png"></div><div class="bcell_mid hpad10"><p class="bold text_med"> It is tails! " . $data["user_name"] . " has lost!!</p></div>";
botPostChat(2, $data["user_roomid"], $msg);
die;
}
else {
if ($flip == 2) {
$msg = "<div class="bcell_mid coin_flip_container"><img class="coin_flip" src="addons/CS_Flip/system/img/heads.png"></div><div class="bcell_mid hpad10"><p class="bold text_med"> It is heads! " . $data["user_name"] . " has won!! </p></div>";
botPostChat(2, $data["user_roomid"], $msg);
die;
}
}
}
}
goto YBZd6;
BQioq: $load_addons = "CS_Flip";
goto yoOV1;
YBZd6:
© 2023 Quttera Ltd. All rights reserved.