Skocz do zawartości

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

Become VIP Plus (+API)


  • 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:7 476
  • Lokalizacja:AMXX.PL
Offline

Napisano 06.06.2016 13:18

<div><font face="Comic Sans MS"><div align="center"><font size="5"><b><u><font color="#408000">Become VIP Plus (+API)</font></u></b></font></div><br /><b><font size="5"><font color="#408000">☄</font> Description</font></b><br /><ul><li>With this plugin players can get free VIP extras when they reach a certain amount of kills. This remake of the plugin has the ability to take the kills from CSStats (/rank), to enable an option which will prevent data loss on server crash, as well as a plugin API with which you can make additional plugins to work with this one in many different ways.</li>
</ul><br /><b><font size="5"><font color="#408000">☄</font> Cvars list</font></b><br /><ul><li><b><font color="#FF8000">becomevip_kills</font> (default: 1000)</b> -- Required number of kills for acquiring free VIP extras.</li>
<li><b><font color="#FF8000">becomevip_flags</font> (default: b)</b> -- The flags that you get when you have the required number of kills. You can leave it blank in case you add the extras with another plugin using the API.</li>
</ul><br /><b><font size="5"><font color="#408000">☄</font> Commands list</font></b><br /><ul><li><b><font color="#FF8000">say /kills</font></b> -- Shows how many kills you need for getting free VIP extras.</li>
<li><b><font color="#FF8000">becomevip_restartall</font></b> -- Resets the data for all players.</li>
<li><b><font color="#FF8000">becomevip_restart_player</font> &lt;nick|#userid&gt;</b> -- Reset a player's data.</li>
</ul><ul><li>Bear in mind that the admin commands are disabled if the CSStats option is enabled.</li>
</ul><br /><b><font size="5"><font color="#408000">☄</font> Additional settings</font></b><br /><ul><li>These settings require editing the .sma file.</li>
</ul><ul><li><b><font color="#FF8000">USING THE DATA FROM CSSTATS</font></b>: This way the kills will be equal to those from CSStats (/rank). The pluigin won't use nVault and the admin commands will be disabled. To enable this option, you need to remove &quot;//&quot; from this line:<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">/*&nbsp;Uncomment&nbsp;this&nbsp;line&nbsp;to&nbsp;use&nbsp;csstats&nbsp;(kills&nbsp;from&nbsp;/rank),&nbsp;instead&nbsp;of&nbsp;nVault&nbsp;*/
<br />#define&nbsp;USE_CSSTATS&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></li>
<li><b><font color="#FF8000">HUD MESSAGE ON RESPAWN</font></b>: This option is enabled by default. It shows a HUD message when the player respawns. The message shows the required number of kills to get free VIP extras, as well as the player's current kills number. To disable this option, you need to add &quot;//&quot; in this line:<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">/*&nbsp;Comment&nbsp;this&nbsp;line&nbsp;to&nbsp;disable&nbsp;the&nbsp;HUD&nbsp;message&nbsp;on&nbsp;player&nbsp;spawn&nbsp;*/
<br />//#define&nbsp;USE_HUD&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></li>
<li><b><font color="#FF8000">SAVING THE DATA BY NICKNAME</font></b>: Using this will make the plugin save data by nickname, instead of SteamID. Bear in mind that this option can only be changed when the CSStats option is disabled. To enable this option, you need to add &quot;//&quot; in this line:<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">//*&nbsp;Comment&nbsp;this&nbsp;line&nbsp;to&nbsp;make&nbsp;the&nbsp;plugin&nbsp;save&nbsp;data&nbsp;by&nbsp;name,&nbsp;instead&nbsp;of&nbsp;SteamID&nbsp;*/
<br />//#define&nbsp;USE_STEAM&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></li>
<li><b><font color="#FF8000">QUICK DATA SAVE</font></b>: This option is recommended if your server crashes often and you want to prevent data loss. When enabled, the data will be saved after every kill. It can only be enabled when the CSStats option is disabled. To enable this option, remove &quot;//&quot; from this line:<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">/*&nbsp;Uncomment&nbsp;this&nbsp;if&nbsp;you&nbsp;want&nbsp;the&nbsp;data&nbsp;to&nbsp;be&nbsp;saved&nbsp;right&nbsp;away&nbsp;-&nbsp;this&nbsp;will&nbsp;prevent&nbsp;losing&nbsp;data&nbsp;when&nbsp;the&nbsp;server&nbsp;crashes&nbsp;*/
<br />#define&nbsp;QUICK_SAVE&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></li>
</ul><br /><b><font size="5"><font color="#408000">☄</font> Plugin API (becomevip.inc)</font></b><br /><ul><li>This plugin also contains an API, i.e. a library (.inc file) which you can use to make additional plugins for this one. You can make it so the players get extras from another plugin, instead of making this one add admin flags. You can also make players get different extras for different number of kills. Here's a simple example of a plugin which will give +50 health points to VIP players on spawn:<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;becomevip&gt;
<br />#include&nbsp;&lt;fun&gt;
<br />#include&nbsp;&lt;hamsandwich&gt;
<br />
<br />#define&nbsp;PLUGIN_NAME&nbsp;"BecomeVIP+&nbsp;Health"
<br />#define&nbsp;PLUGIN_VERSION&nbsp;"1.0"
<br />#define&nbsp;PLUGIN_AUTHOR&nbsp;"OciXCrom"
<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: #0000BB">PLUGIN_NAME</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PLUGIN_VERSION</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">PLUGIN_AUTHOR</span><span style="color: #007700">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">RegisterHam</span><span style="color: #007700">(</span><span style="color: #0000BB">Ham_Spawn</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"player"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"eventPlayerSpawn"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">)
<br />}
<br />
<br />public&nbsp;</span><span style="color: #0000BB">eventPlayerSpawn</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">is_user_alive</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;if(</span><span style="color: #0000BB">IsUserVip</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;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">set_user_health</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">get_user_health</span><span style="color: #007700">(</span><span style="color: #0000BB">id</span><span style="color: #007700">)&nbsp;+&nbsp;</span><span style="color: #0000BB">50</span><span style="color: #007700">)
<br />}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div></li>
</ul><ul><li><b><font color="#FF8000">IsUserVip(id)</font></b> -- Checks whether a players has unlocked the VIP Plus option.</li>
<li><b><font color="#FF8000">GetKillsNeeded()</font></b> -- Gets number of kills needed to get VIP extras.</li>
<li><b><font color="#FF8000">GetUserKills(id)</font></b> -- Gets the number of player's kills.</li>
<li><b><font color="#FF8000">GetKillsLeft(id)</font></b> -- Gets the number of player's kills left.</li>
<li><b><font color="#FF8000">GetVipPrefix(szPrefix[], iPrefixLen)</font></b> -- Gets the plugin prefix.</li>
<li><b><font color="#FF8000">GetVipFlags(szFlags[], iFlagsLen)</font></b> -- Gets the VIP flags that players will receive.</li>
<li><b><font color="#FF8000">UsingCsstats()</font></b> -- Checks whether the plugin is using CSStats.</li>
<li><b><font color="#FF8000">UsingHud()</font></b> -- Checks whether the plugin is using HUD message.</li>
<li><b><font color="#FF8000">UsingSteam()</font></b> -- Checks whether the plugin is using Steam.</li>
<li><b><font color="#FF8000">UsingQuickSave()</font></b> -- Checks whether the plugin is using Quick Save.</li>
</ul><br /><b><font size="5"><font color="#408000">☄</font> Images</font></b><br /><br /><img src="http://i.imgur.com/HRmx6D3.jpg"border="0" alt="" /><br /><br /><img src="http://i.imgur.com/EHbdxfO.jpg" border="0" alt="" /><br /><br /><img src="http://i.imgur.com/BjXzndj.jpg" border="0" alt="" /><br /><br /><img src="http://i.imgur.com/9PVwdwz.jpg" border="0" alt="" /><br /><br /><font size="2">* Click <a href="http://www.gametracker.com/search/?search_by=server_variable&amp;search_by2=becomevipplus&amp;query=&amp;loc=_all&amp;sort=&amp;order=" target="_blank">here</a> to see all servers using this plugin.</font></font></div>


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








<fieldset class="fieldset">
<legend>Attached Files</legend>
<table cellpadding="0" cellspacing="3" border="0">
<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...55"><strong>GetPlugin</strong></a> or
<a href="https://forums.allie...1465215415">GetSource</a> (crx_becomevip.sma - 8.7 KB)

</td>
</tr><tr>
<td><img class="inlineimg" src="https://forums.allie...attach/inc.gif"alt="File Type: inc" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...comevip.inc</a>(1.7 KB)


</td>
</tr>
</table>
</fieldset>


</div>

Wyświetl pełny artykuł




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

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