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

#New [SG] Revive 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:7172
  • Lokalizacja:AMXX.PL
Offline

Napisano 09.11.2014 19:47

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font color="Blue"><font face="Impact"><font size="7">Revive Menu</font></font></font><br /><br /><!-- BEGIN TEMPLATE: bbcode_code_printable -->
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<hr /><code style="margin:0px" dir="ltr" style="text-align:left">#include &lt;amxmodx&gt;<br />#include &lt;amxmisc&gt;<br />#include &lt;Colorchat&gt;<br />#include &lt;hamsandwich&gt;<br /><br />#define PLUGIN &quot;SG revive menu&quot;<br />#define VERSION &quot;1.0&quot;<br />#define AUTHOR &quot;author&quot;<br /><br /><br />public plugin_init() {<br />&nbsp; &nbsp; &nbsp; &nbsp; register_plugin(&quot;SG revive menu&quot;, &quot;1.0&quot;, &quot;hisoka&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; register_clcmd(&quot;say /revive&quot;,&quot;menurevive&quot;)&nbsp; &nbsp; &nbsp; &nbsp; <br />}<br />public menurevive(id)<br />{ <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if ( !(get_user_flags(id) &amp; ADMIN_BAN) )<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED;<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new szText[555 char]<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; formatex(szText, charsmax(szText), &quot;rSG revive Menu&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; new AdminMenu = menu_create(szText, &quot;menuMainHandle&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; formatex(szText, charsmax(szText), &quot;wRespawn 1 Player&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; menu_additem(AdminMenu, szText, &quot;1&quot;, 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; formatex(szText, charsmax(szText), &quot;wRespawn All Player&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; menu_additem(AdminMenu, szText, &quot;2&quot;, 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />}<br /><br />public menuMainHandle(id,menu,item){<br />&nbsp; &nbsp; &nbsp; &nbsp; if (item == MENU_EXIT)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; menu_destroy(menu)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />&nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new data[6], iName[64], access, callback<br />&nbsp; &nbsp; &nbsp; &nbsp; menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new key = str_to_num(data)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; switch(key)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 1:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ReviveMenu(id)&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 2:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_cmd (id, &quot;revive @ 100 100&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />}<br /><br /><br />public ReviveMenu(id)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; new RevivePlayer = menu_create (&quot;w[SG]r Respawn Player&quot;, &quot;HandleRevive&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new num, players[32], tempid, szTempID [10], tempname [32]<br />&nbsp; &nbsp; &nbsp; &nbsp; get_players (players, num, &quot;b&quot;)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; for (new i = 0; i &lt; num; i++)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tempid = players [ i ]<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get_user_name (tempid, tempname, 31)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; num_to_str (tempid, szTempID, 9)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; menu_additem (RevivePlayer, tempname, szTempID, 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; menu_display (id, RevivePlayer)<br />&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />}<br /><br />public HandleRevive(id, menu, item)<br />{<br />&nbsp; &nbsp; &nbsp; &nbsp; if(item == MENU_EXIT)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; menu_destroy(menu)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_HANDLED<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; new data[6], name[64],szPlayerName[33],szName[33]<br />&nbsp; &nbsp; &nbsp; &nbsp; new access, callback<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; menu_item_getinfo (menu, item, access, data, 5, name, 63, callback)<br />&nbsp; &nbsp; &nbsp; &nbsp; new tempid = str_to_num (data)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; get_user_name(id, szName, charsmax(szName))<br />&nbsp; &nbsp; &nbsp; &nbsp; get_user_name(tempid, szPlayerName, charsmax(szPlayerName))<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; ColorChat(0, RED, &quot;^1Admin ^4%s ^1: Respawn ^4%s&quot;, szName, szPlayerName)<br />&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; ExecuteHamB(Ham_CS_RoundRespawn, tempid)<br />&nbsp; &nbsp; &nbsp; &nbsp; menu_destroy(menu);<br />&nbsp; &nbsp; &nbsp; &nbsp; ReviveMenu(id)<br />&nbsp; &nbsp; &nbsp; &nbsp; return PLUGIN_CONTINUE<br />}</code><hr />
</div>
<!-- END TEMPLATE: bbcode_code_printable --></div>


<br /> <div style="padding:6px">








<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<!-- BEGIN TEMPLATE: postbit_attachment -->
<tr>
<td><img class="inlineimg" src="https://forums.allie.../attach/sma.gif" alt="File Type: sma" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>

<a href="http://www.amxmodx.o...?file_id=139698"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1415558832">Get Source</a> (revive-test.sma - 2.4 KB)

</td>
</tr>
<!-- END TEMPLATE: postbit_attachment -->
</table>
</fieldset>


</div>

<!-- END TEMPLATE: postbit_external -->

Wyświetl pełny artykuł




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

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