Hi All,
I'm trying to write a semi-clip plugin for Zombie plague. It's supposed to let humans only pass through each other. The problem with it is that if two humans are inside each other, the zombies can't infect them. Are there any good plugins out there already, or a better way to do this? Code below:
Code:
#include <amxmodx>
#include <engine>
#include <fun>
#include <zombieplague>
public plugin_init() {
register_plugin("Semiclip", "1.0", "")
register_touch("player", "player", "touchPlayer");
}
public touchPlayer(toucher, touched) {
if (!zp_get_user_zombie(toucher) && !zp_get_user_zombie(touched)) {
unsolid(toucher);
if (!task_exists(toucher)) {
set_task(1.0, "solid", toucher);
}
}
}
public solid(id) {
entity_set_int(id, EV_INT_solid, SOLID_BBOX);
set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,0)
}
public unsolid(id) {
entity_set_int(id, EV_INT_solid, SOLID_NOT);
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 80)
}