JasonTB

robdealer.php

Nov 5th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.04 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  * Module Maker: JasonTB
  5.  * Module Name: Rob a Local Dealer
  6.  * Module Support: [email protected] or JasonTB on MWG
  7.  */
  8.  
  9. require(__DIR__.'/globals.php');
  10.  
  11. $error = ' ';
  12. if($ir['hospital'] > 0){
  13.     $error .= "You can not rob a dealer while in the hospital. " ;
  14. }
  15.  
  16. if($ir['jail'] > 0){
  17.     $error .= "You can not rob a dealer while in the jail. ";
  18. }
  19.    
  20. if ($ir['rld'] != 0){
  21.     $error .= "You can only rob the local deals once a day.";    
  22. }
  23.  
  24. if($error <> ' ') {
  25.     echo $error;
  26.     $h->endpage();
  27.     exit;
  28. }
  29.  
  30.  
  31.  
  32.  
  33.    
  34. if (!$_GET['action']){
  35.     echo"<h3>Rob a Local Dealer</h3><br />
  36.     You drove around the neighbor hood and notices three different dealers selling different things.<br />
  37.     Who would you like to rob?<br />
  38.     <a href='robdealer.php?action=weed'>Weed Dealer</a> &emsp;
  39.     <a href='robdealer.php?action=crack'>Crack Dealer</a> &emsp;
  40.     <a href='robdealer.php?action=heroin'>Heroin Dealer</a>";
  41. }
  42. elseif ($_GET['action'] == 'weed'){
  43.     global $db, $ir, $c, $userid;
  44.     $chance = rand(1, 10);
  45.     $steal1 = rand(30, 125);
  46.     if($chance < 6){
  47.         echo"The weed dealer seen you watching from down the block,<br /> without taking a chance he opens fires on you putting you in the hospital for 20 mins.";
  48.         $db->query("UPDATE users SET hospital = hospital +20, hospreason = 'Shot by Weed Dealer', rld = 1 WHERE userid = {$ir['userid']}");
  49.     }
  50.     else{
  51.         echo"You run up on the weed dealer and put your gun to his head,<br /> he drops all his drugs and runs away you pick up {$steal1} grams and disappear.";
  52.         $db->query("UPDATE users SET weed = weed + {$steal1}, rld = 1 WHERE userid = {$ir['userid']}");
  53.     }
  54. }
  55. elseif ($_GET['action'] == 'crack'){
  56.     global $db, $ir, $c, $userid;
  57.     $chance = rand(1, 10);
  58.     $steal2 = rand(10, 50);
  59.     if($chance < 4){
  60.         echo"The crack dealer seen you watching from down the block,<br /> without taking a chance he opens fires on you putting you in the hospital for 20 mins";
  61.         $db->query("UPDATE users SET hospital = hospital +20, hospreason = 'Shot by Crack Dealer', rld = 1 WHERE userid = {$ir['userid']}");
  62.     }
  63.     else{
  64.         echo"You run up on the crack dealer and put your gun to his head,<br /> he dopes all his drugs and runs away you pick up {$steal2} ounces and disappear.";
  65.         $db->query("UPDATE users SET crack = crack + {$steal2}, rld = 1 WHERE userid = {$ir['userid']}");
  66.     }
  67. }
  68. elseif ($_GET['action'] == 'heroin'){
  69.     global $db, $ir, $c, $userid;
  70.     $chance = rand(1, 10);
  71.     $steal3 = rand(5, 25);
  72.     if($chance < 2){
  73.         echo"The heroin dealer seen you watching from down the block,<br /> without taking a chance he opens fires on you putting you in the hospital for 20 mins";
  74.         $db->query("UPDATE users SET hospital = hospital +20, hospreason = 'Shot by Heroin Dealer', rld = 1 WHERE userid = {$ir['userid']}");
  75.     }
  76.     else{
  77.         echo"You run up on the heroin dealer and put your gun to his head,<br /> he dopes all his drugs and runs away you pick up {$steal3} grams and disappear.";
  78.         $db->query("UPDATE users SET heroin = herion + {$steal3}, rld = 1 WHERE userid = {$ir['userid']}");
  79.     }
  80. }
  81.  
  82. $h->endpage();
Advertisement
Add Comment
Please, Sign In to add comment