Skocz do zawartości

  • Zaloguj korzystając z Facebooka Zaloguj korzystając z Twittera Zaloguj przez Steam Zaloguj poprzez Google      Logowanie »   
  • Rejestracja

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.

  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

~#| Admin Menu |#~


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7179
  • Lokalizacja:AMXX.PL
Offline

Napisano 23.06.2015 16:09

<div><div align="center"><b><font color="green"><font face="Trebuchet MS"><font size="6">.:= Admin Menu =:.</font></font></font></b></div><br /><font color="Red">[R#G]</font> <font color="Orange">Admin Menu</font><br /><br /><font color="Red">Ban</font><br /><font color="Red">KicK</font><br /><br /><font color="Orange">Slay/Slap</font><br /><br /><font color="Orange">Change Map</font><br /><font color="Orange">Vote Map</font><br /><br /><font color="Gray">Restart Round</font><br /><br /><div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2">
<hr />
<code style="white-space:nowrap">
<div dir="ltr" style="text-align:left;">
<!-- php buffer start --><code><span style="color: #000000">
<span style="color: #0000BB"></span><span style="color: #FF8000">#include&nbsp;&lt;amxmodx&gt;
<br />#include&nbsp;&lt;ColorChat&gt;
<br />
<br /></span><span style="color: #007700">public&nbsp;</span><span style="color: #0000BB">plugin_init</span><span style="color: #007700">()
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">register_plugin</span><span style="color: #007700">(</span><span style="color: #DD0000">"Admin&nbsp;Menu"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"1.0"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"BooHLaaL"</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">register_clcmd</span><span style="color: #007700">(</span><span style="color: #DD0000">"say&nbsp;/admin"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Show_Admin_Menu"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">_</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Open&nbsp;Admin&nbsp;Menu"</span><span style="color: #007700">,</span><span style="color: #0000BB">ADMIN_KICK</span><span style="color: #007700">);
<br />}
<br />
<br />public&nbsp;</span><span style="color: #0000BB">Show_Admin_Menu</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(!(</span><span style="color: #0000BB">get_user_flags</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">)&nbsp;&amp;&nbsp;</span><span style="color: #0000BB">ADMIN_KICK</span><span style="color: #007700">))
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ColorChat</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #0000BB">GREEN</span><span style="color: #007700">,</span><span style="color: #DD0000">"^4[R#G]&nbsp;^3Sorry^4,&nbsp;^1This&nbsp;^4Menu&nbsp;^1Only&nbsp;For&nbsp;^4Admin&nbsp;^3!"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">PLUGIN_HANDLED
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">}
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">menu&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">menu_create</span><span style="color: #007700">(</span><span style="color: #DD0000">"r[R#G]&nbsp;yAdmin&nbsp;Menu"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"Admin_Menu"</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"rBan"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMIN_BAN</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"rKicK^n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMIN_KICK</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"ySlay/Slap^n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMIN_SLAY</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"yChange&nbsp;Map"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMIN_MAP</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"yVote&nbsp;Map^n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">ADMIN_MAP</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_additem</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"dRestart&nbsp;Round"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_setprop</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">MPROP_EXIT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">MEXIT_ALL</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_display</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">PLUGIN_HANDLED</span><span style="color: #007700">;
<br />}
<br />
<br />public&nbsp;</span><span style="color: #0000BB">Admin_Menu</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">item</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(</span><span style="color: #0000BB">item&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">MENU_BACK</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_cancel</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">PLUGIN_HANDLED</span><span style="color: #007700">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #0000BB">command</span><span style="color: #007700">[</span><span style="color: #0000BB">6</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">name</span><span style="color: #007700">[</span><span style="color: #0000BB">64</span><span style="color: #007700">],&nbsp;</span><span style="color: #0000BB">access</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">callback</span><span style="color: #007700">;
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_item_getinfo</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">item</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">access</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">command</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof&nbsp;command&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">name</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">sizeof&nbsp;name&nbsp;</span><span style="color: #007700">-&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">callback</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;switch(</span><span style="color: #0000BB">item</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">client_cmd</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #DD0000">"amx_banmenu"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">client_cmd</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #DD0000">"amx_kickmenu"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">2</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">client_cmd</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #DD0000">"amx_slapmenu"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">3</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">client_cmd</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #DD0000">"amx_mapmenu"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">4</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">client_cmd</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #DD0000">"amx_votemapmenu"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">Rs</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">menu_destroy</span><span style="color: #007700">(</span><span style="color: #0000BB">menu</span><span style="color: #007700">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">PLUGIN_HANDLED</span><span style="color: #007700">;
<br />}
<br />public&nbsp;</span><span style="color: #0000BB">Rs</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">)
<br />{
<br />&nbsp;&nbsp;&nbsp;&nbsp;static&nbsp;</span><span style="color: #0000BB">szName</span><span style="color: #007700">[</span><span style="color: #0000BB">32</span><span style="color: #007700">];
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">get_user_name</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szName&nbsp;</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">33</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">server_cmd</span><span style="color: #007700">(</span><span style="color: #DD0000">"sv_restartround&nbsp;1"</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">ColorChat</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,</span><span style="color: #0000BB">GREEN</span><span style="color: #007700">,</span><span style="color: #DD0000">"^4[R#G]&nbsp;^3Admin&nbsp;^4%s&nbsp;^3Restart&nbsp;The&nbsp;Round."</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">szName</span><span style="color: #007700">)
<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></div>

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych