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 Kill FX


  • 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 07.02.2014 19:31

<!-- BEGIN TEMPLATE: postbit_external -->
<div><font size="5">Knife Kill FX 0.1</font><br /><br />This is my first plugin. Please point out what I possibly did wrong.<br /><br />This plugin is combined from <a href="https://forums.allie...ber.php?u=44027" target="_blank">Shidla</a>'s spartaknifekill(attached) and anakin_cstrike's <a href="https://forums.alliedmods.net/showthread.php?p=662151" target="_blank">Deathtype Effects v1.0</a><br /><br />It is basically intended for making hahaha sound to everybody on server and emitting local meat slash sound (based on HL zombie hit sound, no need to precache), also making blood splash after cutting somebody<br /><br /> I need help here. 3 issues.<br />1) not emitting laugh sound when clients cvar &quot;Mp3Volume 0&quot; or low values<br />2) not working flesh sound upon death (why?)<br />3) How can I make a little bit not so fast splash and coming out of the body but not appearing instantly as a cloud?<br /><br /><br />CODE:<br /><div style="margin: 5px;">
<div class="smallfont" style="margin-bottom: 2px;">
<b>Spoiler</b> <input value="Show" style="margin: 0px; padding: 0px; width: 45px; font-size: 10px;" onclick="if(this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display != 'inline')
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'inline'; this.innerText = ''; this.value = 'Hide'; }
else
{ this.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div')[0].style.display = 'none'; this.innerText = ''; this.value='Show'; }" type="button">
</div>
<div class="alt2" style="border: 1px inset; padding: 6px;">
<div class="spoiler" style="display: none;"><br />//This plugin is combined from Shidla's spartaknifekill and anakin_cstrike's Deathtype Effects v1.0<br />#include &lt;amxmodx&gt;<br />#include &lt;fakemeta&gt;<br />#include &lt;csx&gt;<br /><br />new const g_gomerhaha[] = &quot;sound/gomerhaha.mp3&quot;<br />new const g_meatslash1[] = &quot;zombie/claw_strike1.wav&quot;<br />new const g_meatslash2[] = &quot;zombie/claw_strike2.wav&quot;<br />new const g_meatslash3[] = &quot;zombie/claw_strike3.wav&quot;<br /><br />public plugin_init()<br />{<br /> register_plugin(&quot;KNife Kill Fx&quot;, &quot;0.1&quot;, &quot;paradox&quot;)<br />}<br /><br />public plugin_precache()<br />{<br /> precache_generic(g_gomerhaha);<br /> precache_sound(g_meatslash1);<br /> precache_sound(g_meatslash2);<br /> precache_sound(g_meatslash3);<br /> return PLUGIN_CONTINUE<br />}<br /><br />public client_death(killer, victim, wpnindex, hitplace, TK)<br />{<br /> if((wpnindex == CSW_KNIFE) &amp;&amp; is_user_alive(killer))<br /> {<br /> client_cmd(0, &quot;Mp3Volume 1&quot;) //I need help here. how can I get user's Mp3Volume cvar parameter in order to<br /> client_cmd(0, &quot;mp3 play %s&quot;, g_gomerhaha); //set it back after playing the sound to client? any efficient way to do this?<br /> switch ( random_num( 0, 2 ) )<br /> {<br /> case 0: emit_sound(victim,CHAN_ITEM, &quot;g_meatslash1&quot;, 1.0, ATTN_NORM, 0, PITCH_NORM)<br /> case 1: emit_sound(victim,CHAN_ITEM, &quot;g_meatslash2&quot;, 1.0, ATTN_NORM, 0, PITCH_NORM)<br /> case 2: emit_sound(victim,CHAN_ITEM, &quot;g_meatslash3&quot;, 1.0, ATTN_NORM, 0, PITCH_NORM)<br /> }<br /> new vOrigin[3],coord[3];<br /> get_user_origin(victim,vOrigin);<br /> vOrigin[2] -= 26<br /> coord[0] = vOrigin[0] + 150;<br /> coord[1] = vOrigin[1] + 150;<br /> coord[2] = vOrigin[2] + 800;<br /> create_blood(vOrigin);<br /> }<br />}<br /><br />create_blood(vec1[3])<br />{<br /> message_begin(MSG_BROADCAST,SVC_TEMPENTITY); <br /> write_byte(TE_LAVASPLASH); <br /> write_coord(vec1[0]); <br /> write_coord(vec1[1]); <br /> write_coord(vec1[2]); <br /> message_end(); <br />}<br /></div>
</div>
</div><br />Installation is simple - compile the .sma and unzip sound.zip to sound folder of cstrike.</div>


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


<fieldset class="fieldset">
<legend>Attached Thumbnails</legend>
<div style="padding:3px">
<!-- BEGIN TEMPLATE: postbit_attachmentthumbnail -->

<a href="https://forums.allie...38;d=1391801556" rel="Lightbox_2096834" id="attachment130350"><img class="thumbnail" src="https://forums.alliedmods.net/attachment.php?attachmentid=130350&amp;stc=1&amp;thumb=1&amp;d=1391801556" border="0" alt="Click image for larger version

Name: de_dust20003.jpg
Views: N/A
Size: 85.3 KB
ID: 130350" /></a>
&nbsp;

<!-- END TEMPLATE: postbit_attachmentthumbnail -->
</div>
</fieldset>







<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/zip.gif" alt="File Type: zip" width="16" height="16" border="0" style="vertical-align:baseline" /></td>
<td>


<a href="https://forums.allie...38;d=1391797525">spartaaa_knife_kill.zip</a> (197.4 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- BEGIN TEMPLATE: postbit_attachment -->
<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...38;d=1391797668">sound.zip</a> (31.2 KB)


</td>
</tr>
<!-- END TEMPLATE: postbit_attachment --><!-- 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=130347"><strong>Get Plugin</strong></a> or
<a href="https://forums.allie...38;d=1391797860">Get Source</a> (knifekillfx.sma - 1.8 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