Team BlueWater Game Online Tutorial's
Bine ati venit la Team-BlueWater!!Tutorial's 4 all Games!

WebShop GM

View previous topic View next topic Go down

WebShop GM

Post  m4s4cru on Tue Aug 02, 2011 12:39 pm

GM.php
Code:
<?php
iseedeadpeople();
switch (1) {
   default:
   if ($webshop['credits']['makegmchar']<1) {
      print phrase_blocked_module;
      break;
   }
   if ($_POST['cname']) {
      $query    = mssql_query("select [ctlCode] from [Character] where [Name]='".$_POST['cname']."'");
      $result   = mssql_fetch_row($query);
      if ($result[0]!=$webshop['misc']['normalcode']) {
         print phrase_not_normal;
         break;
      }
      if ($webshop['credits']['makegmchar']>$mycreds) {
         print phrase_lack_credits;
         break;
      }
      if (in_array(strtolower($_POST['cname']), explode(',', $webshop['misc']['solidbans']))) {
         print phrase_permbancantgm;
         break;
      }
      mssql_query("exec XCredits '".$GLOBALS['mu_user']."', ".($webshop['credits']['makegmchar']*-1).";");
      mssql_query("update [Character] set [ctlCode]=8 where  [Name]='".$_POST['cname']."'");
      shoplog(phrase_gm_log.$_POST['cname']);
      print '<b>'.htmlspecialchars($_POST['cname']).'<font color=green>'.phrase_gamemaster.'</font></b><br><br>';
   }
   print '<fieldset style="width: 300px;background-color: #DDDDDD;border: 1px solid #000000; font-family: arial; font-size: 12px;"><legend class="mu_style2" style="padding: 3px;font-weight:bold;background-color: #DDDDDD;border: 1px solid #000000;border-bottom:0px;">Make Your Character GM!</legend>
<form method="post" action="">
Make Your Character GM will cost <b>'.number_format($webshop['credits']['makegmchar']).'</b> credits<br><br>
Character name <input type="text" name="cname" id="cname" maxlength="10" size="7">
<input type="submit" value="Make GM">
</fieldset>
   ';
}
?>


In wshmodules.php add :

define('gm', moddir.'/gm.php'); // since v0.1
avatar
m4s4cru
Admin
Admin

Mesaje : 172
Data de inscriere : 2011-07-29
Varsta : 26

View user profile

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum