[Guide] WebShop GM

View previous topic View next topic Go down

[Guide] WebShop GM

Post by bugme on Tue Dec 16, 2014 2:31 am

Правите 1 файл 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>
   ';
}
?>

след това добавяте в wshmodules.php

Code:
define('gm',        moddir.'/gm.php');        // since v0.1

След това добавяте в wshconf.php

Code:
$webshop['credits']['makegmchar'] = 1000; // ГМ

в \lang\english.php

Code:
#GM
define('phrase_not_normal',   "Your Character Is Banned or GameMaster");
define('phrase_lack_credits', "You do not have enough credits to do that.");
define('phrase_gamemaster',    " Is Game Master");
define('phrase_menu_GM',       "Get Admin Hero");  

Credits: ivowe3
avatar
bugme
V.I.P
V.I.P

Брой мнения : 21
Points : 70
Reputation : 13
Join date : 2014-12-11
Age : 28
Местожителство : Bulgaria - Burgas

View user profile http://wartune.bulgarianforum.net

Back to top Go down

Re: [Guide] WebShop GM

Post by VIRUS on Tue Dec 16, 2014 2:37 am

За да искарате в меню-то опцията трябва да добавите в Menu_Config.inc следния код:

Code:
// GM
if ($webshop['credits']['makegmchar'])    $menu -> item(phrase_menu_GM, 'index.php?sy=gm');
avatar
VIRUS
Member
Member

Брой мнения : 9
Points : 13
Reputation : 0
Join date : 2014-12-10
Age : 32

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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