ZMBIO.RO

[Image: Untitled-image.png]

Plugin Hit Wall Effect ZP 4.3

This plugin adds visual effects when hitting walls with your knife in Zombie Plague.  If you're a Zombie, hitting a wall with your knife creates blood spatters or zombie-specific impact marks.  If you're a Human , hitting a wall with your knife produces realistic sparks.

Code:
#include <amxmodx>
#include <reapi>
#include <zombieplague>

public plugin_init()
{
register_plugin("ZP 4.3: Hit Wall Effect", "1.0", "Marenin");

RegisterHookChain(RH_SV_StartSound, "@SV_StartSound_Post", true);
}

@SV_StartSound_Post(const iRecipients, const pPlayer, const iChannel, const szSample[], const iVolume, const Float: flAttenuation, const iFlags, const iPitch)
{
if (!is_user_connected(pPlayer))
return;

if (szSample[8] == 'k' && szSample[9] == 'n' && szSample[10] == 'i' && szSample[11] == 'f' && szSample[12] == 'e')
{
switch (szSample[17])
{
case 'w':
{
static vecStart[3], vecEnd[3];

get_user_origin(pPlayer, vecStart);
get_user_origin(pPlayer, vecEnd, 3);

if (get_distance(vecStart, vecEnd) < 66)
{
if (zp_get_user_zombie(pPlayer))
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, vecEnd, 0);
write_byte(TE_WORLDDECAL);
write_coord(vecEnd[0]);
write_coord(vecEnd[1]);
write_coord(vecEnd[2]);
write_byte(random_num(187, 188));
message_end();
}
else
{
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, vecEnd, 0);
write_byte(TE_SPARKS);
write_coord(vecEnd[0]);
write_coord(vecEnd[1]);
write_coord(vecEnd[2]);
message_end();
}
}
}
}
}
}



VersionAuthorRequirementsMod for
1.0.0UnknownReapi / ZombiePlagueZP 4.3
[Image: 61964c-9a2d4019738b4cbaa8d9a71fee4f4930.webp]
谢谢作者辛苦了
Download lInk! ?
Am adaugat direct sursa pluginului in post, cheers !
zombies never die!
Users browsing this thread: