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

Knife System v2


  • 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 26.02.2016 17:14

<div><b>What is this plugin?</b><br />It gives you an easy chance to make a knife server, without knowing how to script, beacause you can easily edit everything in files and expand the shop with sub-plugins.<br />My target was create a completly editable, dynamic plugin. <br /><br /><b>Usage, settings?</b><br />1. First of all begin with the language file, you can here set the keywords to set the knife abilities:<br /><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">KEY1 -&gt; v_*.mdl -s ( viewmodel, default: v_knife.mdl )[ string ]<br />KEY2 -&gt; p_*.mdl -s ( weaponmodel, default: p_knife.mdl )[ string ]<br />KEY3 -&gt; speed ( maxspeed, between 0 and 2000, default: 250 )[ float ]<br />KEY4 -&gt; gravity ( gravity, over 0, default: 800, like with sv_gravity )[ float ]<br />KEY5 -&gt; damage ( damage to add to the default, default: 0 )[ float ]<br />KEY6 -&gt; knockback ( knockback when hit someone, default: 0 )[ float ]<br />KEY7 -&gt; health ( health to add to the default, default: 0 )[ float ]<br />KEY8 -&gt; visibly ( visibly, between 0 and 255, default: 255, full visibly )[ int ]<br />KEY9 -&gt; level ( needed level to use the knife, default: 0 )[ int ]</code><hr />
</div>2. If the previous is done, than you can give the knives in knives.txt in configs folder. You've to use the previously adjusted keywords to give the abilities.<br />First the name of the knife ( what you will see in the menu ) between square brackets, after the abilites in this form: KEYWORD = VALUE<br />An example:<br />In multi-lang file:<br /><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">[en]<br />KEY1 = VMODEL<br />KEY2 = PMODEL<br />KEY3 = SPEED<br />KEY4 = GRAVITY<br />KEY5 = DAMAGE<br />KEY6 = KNOCKBACK<br />KEY7 = HEALTH<br />KEY8 = VISIBLY<br />KEY9 = LEVEL</code><hr />
</div>In knives.txt:<br /><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">[SUPER KNIFE]<br />VMODEL = v_hipersuper.mdl<br />PMODEL = p_hipersuper.mdl<br />SPEED = 450<br />GRAVITY = 400<br />DAMAGE = 10<br />KNOCKBACK = 150<br />HEALTH = 40<br />VISIBLY = 150<br />LEVEL = 450</code><hr />
</div>+infos:<br />You needn't give all of the abilities, if you miss out an ability, then prevail the default value. <br />You needn't write down the fractions, but if you want you can. <br /><br />3. And the last one: the advancement, what you can set in the levels.txt in the configs folder.<br />You can set one by one, or give an interval where increases the needed xp with the given value or mix this ways.<br />Examples:<br />one by one ( in levels.txt ):<br /><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">50 // 50 xp needed to level 1<br />150 // 150 -||- 2<br />500 // 500 -||- 3<br />653 // ...</code><hr />
</div>interval:<br /><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">1, 50... 100<br />51, 100... 200</code><hr />
</div>From lvl 1 to lvl 50 increas the necessary xp with 100. ( from lvl 0 to lvl 1 you need 100 xp, from lvl 1 to lvl 2 200xp ... )<br />From lvl 51 to lvl 100 increas the necessary xp with 200.<br /><br /><b>Cvars:</b><br /><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">kill_msgs<br />0 - noone get info about the kill ( on chat, about who kill you or what get you for the kill )<br />1 - just the killer<br />2 - the killer and the victim<br />kill_xp<br />over 0 - how many xp get you for the kill<br />kill_point<br />over 0 - how many point get you for the kill<br />hs_xp<br />over 0 - extra xp for the headshoot<br />hs_point<br />over 0 - extra point for the headshoot</code><hr />
</div><b>Saving:</b><br />MYSQL or NVAULT<br />In the 16th line you can see:<br /><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">//#define SQL</code><hr />
</div>If you want to use SQL saving, you have to remove the two backslash( // ) before the hashtag( # ), and fill out the mysql infos array.<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: #007700">new&nbsp;const&nbsp;</span><span style="color: #0000BB">g_sSQL_INFOS</span><span style="color: #007700">[&nbsp;][&nbsp;]&nbsp;=<br />{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"127.0.0.1"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"USERNAME"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"PASSWORD"</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">"DATABASE"<br /></span><span style="color: #007700">}&nbsp;
<br /></span><span style="color: #0000BB"></span>
</span>
</code><!-- php buffer end -->
</div>
</code>
<hr />
</div>
</div><b>Required moduls:</b><br />- amxmodx 1.8.3!!!*( tested on 1.8.3.-dev-4976 ++ )<br />- engine<br />- hamsandwich<br /><br /><b>Sub-plugins:</b><br />All the natives and forwards are documented in the header file( .inc ).</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/zip.gif"alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...>addons.zip</a>(10.1 KB)


</td>
</tr><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...1456503253">GetSource</a> (KnifeSystem.sma - 29.9 KB)

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


<a href="https://forums.allie...eSystem.txt</a>(2.8 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