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
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Wrzuć wszystko z SemiclipEx to folderu cstrike
Wrzuć wszystko z SemiclipEx to folderu cstrike
Wrzuć wszystko z SemiclipEx to folderu cstrike
Przykładowy plugin:
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <semiclipex></semiclipex></fakemeta></amxmisc></amxmodx>
#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)
}
#include <amxmodx> #include <amxmisc> #include <fakemeta> #include <semiclipex></semiclipex></fakemeta></amxmisc></amxmodx> #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) }
#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

This site uses Akismet to reduce spam. Learn how your comment data is processed.