不修改HUD.txt伪显示杀敌效果龟大婶
求救大婶们加
刀杀效果
雷杀效果
求救大婶们加,刀杀效果,雷杀效果,每局都从1kill开始
本帖最后由 郑林轩 于 2015-1-9 03:22 编辑/*
--------------------------------------------------------------------------------
Web URL:http://t.qq.com/k1nader
E-M@IL: mailto: jon.ray@qq.com
--------------------------------------------------------------------------------
*/
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "SHOWKILL"
#define VERSION "1.0"
#define AUTHOR "k1nader"
#define LOADING "^n^t%s v%s, Copyright (C) 2011 by %s^n"
new const g_Sounds[][] =
{
"vox/zero.wav",
"vox/one.wav",
"vox/two.wav",
"vox/three.wav",
"vox/four.wav",
"vox/five.wav",
"vox/six.wav",
"vox/seven.wav",
"vox/eight.wav",
"vox/nine.wav",
"vox/ten.wav"
}
new g_iSprindex, g_iKillCount, Float:g_fKillTime;
public plugin_precache()
{
new i;
for (i = 0; i < sizeof g_Sounds; i++)
engfunc(EngFunc_PrecacheSound, g_Sounds);
engfunc(EngFunc_PrecacheSound, "vox/headshot.wav");
new precachestr;
for (i = 0; i < 9; i++)
{
formatex(precachestr, charsmax(precachestr), "sprites/kill_%d.spr", i + 1);
g_iSprindex = engfunc(EngFunc_PrecacheModel, precachestr);
}
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
server_print(LOADING, PLUGIN, VERSION, AUTHOR);
register_event("DeathMsg", "EventDeathMsg", "a")
}
public client_connect(id)
{
g_iKillCount = 0;
g_fKillTime = 0.0;
}
public EventDeathMsg()
{
new killer = read_data(1);
new victim = read_data(2);
new headshot = read_data(3);
if (is_user_connected(killer))
{
if ((get_gametime() - g_fKillTime) > 5.0)
g_iKillCount = 0;
g_fKillTime = get_gametime();
g_iKillCount++;
g_iKillCount = 0;
if (g_iKillCount > 9)
g_iKillCount = 1;
if (9 > (g_iKillCount - 1) >= 0)
{
ShowSprView(killer, g_iSprindex - 1]);
if (headshot)
client_cmd(killer, "spk ^"vox/headshot.wav^"");
else
{
new szWord;
num_to_word(g_iKillCount, szWord, charsmax(szWord));
client_cmd(killer, "spk ^"vox/%s kill^"", szWord);
}
}
}
}
stock ShowSprView(killer, sprent)
{
new Float:fOrigin, Float:vDes;
pev(killer, pev_origin, fOrigin);
velocity_by_aim(killer, 130, vDes);
vDes = vDes + fOrigin;
vDes = vDes + fOrigin;
vDes = vDes + fOrigin + 50.0;
engfunc(EngFunc_MessageBegin, MSG_ONE, SVC_TEMPENTITY, vDes, killer);
{
write_byte(TE_GLOWSPRITE);
engfunc(EngFunc_WriteCoord, vDes);
engfunc(EngFunc_WriteCoord, vDes);
engfunc(EngFunc_WriteCoord, vDes);
write_short(sprent);
write_byte(10);
write_byte(2);
write_byte(255);
}
message_end();
} 很简单的,多缓冲一个 headshot 的 spr,然后在 death_event 里面判断爆头的地方再加个 spr 播放就OK了。 k1nader 发表于 2015-1-10 21:20
很简单的,多缓冲一个 headshot 的 spr,然后在 death_event 里面判断爆头的地方再加个 spr 播放就OK了。 ...
真心不会欧巴,加刀杀spr雷杀spr和每局重1开始算kill。希望你能够帮我写完大神 k1nader 发表于 2015-1-10 21:20
很简单的,多缓冲一个 headshot 的 spr,然后在 death_event 里面判断爆头的地方再加个 spr 播放就OK了。 ...
真心不会欧巴,加刀杀spr雷杀spr和每局重1开始算kill。希望你能够帮我写完大神
页:
[1]