<!-- 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 "Mp3Volume 0" 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 <amxmodx><br />#include <fakemeta><br />#include <csx><br /><br />new const g_gomerhaha[] = "sound/gomerhaha.mp3"<br />new const g_meatslash1[] = "zombie/claw_strike1.wav"<br />new const g_meatslash2[] = "zombie/claw_strike2.wav"<br />new const g_meatslash3[] = "zombie/claw_strike3.wav"<br /><br />public plugin_init()<br />{<br /> register_plugin("KNife Kill Fx", "0.1", "paradox")<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) && is_user_alive(killer))<br /> {<br /> client_cmd(0, "Mp3Volume 1") //I need help here. how can I get user's Mp3Volume cvar parameter in order to<br /> client_cmd(0, "mp3 play %s", 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, "g_meatslash1", 1.0, ATTN_NORM, 0, PITCH_NORM)<br /> case 1: emit_sound(victim,CHAN_ITEM, "g_meatslash2", 1.0, ATTN_NORM, 0, PITCH_NORM)<br /> case 2: emit_sound(victim,CHAN_ITEM, "g_meatslash3", 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&stc=1&thumb=1&d=1391801556" border="0" alt="Click image for larger version
Name: de_dust20003.jpg
Views: N/A
Size: 85.3 KB
ID: 130350" /></a>
<!-- 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ł
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.
|
Guest Message by DevFuse
Knife Kill FX
Temat rozp.
Adminek AMXX.PL
, 07.02.2014 19:31
Brak odpowiedzi do tego tematu
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych