SemiclipEx – Przenikanie bytów

Moduł ten pozwala graczom i pociskom przejść przez wszelkie byty, dodatkowo istnieje możliwość kontrolowania tego z pluginu. Ustawienia semiclip mogą być zmieniane przez pluginy AMXX dynamicznie. Semiclip może być ustawiany dla dowolnych bytów istniejących w grze. Instalacja
Wrzuć wszystko z SemiclipEx to folderu cstrike
Przykładowy plugin:
#include 
#include 
#include 
#include 

#define PLUGIN "SemiclipEx Test"
#define VERSION "1.0.0"
#define AUTHOR "hzqst"

public PM_ShouldCollide(playerindex, entindex)
{
if(!is_user_alive(entindex) || playerindex == entindex)
return 1;
if(get_user_team(playerindex) == get_user_team(entindex))
return 0;
return 1;
}

public ShouldCollide(playerindex, entindex)
{
new ret;
if(!is_user_alive(entindex) || playerindex == entindex)
ret = 1;
else if(get_user_team(playerindex) == get_user_team(entindex))
ret = 0;
else
ret = 1;
forward_return(FMV_CELL, ret);
return FMRES_SUPERCEDE;
}

public AddToFullPack_Post(es_handle,e,ent,host,hostflags,player,pSet)
{
if(PM_ShouldCollide(host, ent) == 0)
{
set_es(es_handle, ES_Solid, SOLID_NOT);
}
return FMRES_HANDLED;
}

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)

// Add your code here...
SCE_RegisterForward(func_PM_ShouldCollide, "PM_ShouldCollide");
register_forward(FM_ShouldCollide, "ShouldCollide")
//Just for client-side prediction
register_forward(FM_AddToFullPack,"fw_AddToFullPack_Post",1)
}  
Oryginalny temat: https://forums.alliedmods.net/showthread.php?t=261852 Download SemiclipEx_full.zip Download

Dodaj komentarz

Witryna wykorzystuje Akismet, aby ograniczyć spam. Dowiedz się więcej jak przetwarzane są dane komentarzy.