Szukam pluginu, który sprawi, że żadnej broni się nie da opuścić i pojawia się taka sama informacja jak podczas próby opuszczenia kosy.
Witamy w Nieoficjalnym polskim support'cie AMX Mod X
Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
|
Guest Message by DevFuse
Nie można opuścić żadnej broni
Temat rozp. iNickel, 23.03.2014 19:02
2 odpowiedzi w tym temacie
#1
Napisano 23.03.2014 19:02
#2
Napisano 29.03.2014 15:23
proszę.
Załączone pliki
#3
Napisano 29.03.2014 16:00
Już lepsze będzie to:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Zakaz wyrzucania broni"
#define VERSION "1.0"
#define AUTHOR "fragmenty kodu od roznych autorow"
#define CLASSNAME "armoury_entity"
new commands[][]={
"fullupdate",
"cl_autobuy",
"cl_rebuy",
"cl_setautobuy",
"rebuy",
"autobuy",
"hegren",
"sgren",
"flash",
"drop",
"p228",
"228compact",
"shield",
"scout",
"xm1014",
"autoshoutgun",
"mac10",
"aug",
"bullpup",
"elites",
"fn57",
"fiveseven",
"ump45",
"sg550",
"sg552",
"krieg550",
"galil",
"defender",
"famas",
"clarion",
"usp",
"km45",
"glock",
"9x19mm",
"awp",
"magnum",
"mp5",
"smg",
"m249",
"m3",
"12gauge",
"m4a1",
"tmp",
"mp",
"g3sg1",
"d3au1",
"deagle",
"nighthawk",
"krieg552",
"ak47",
"cv47",
"p90",
"c90",
"primammo",
"secammo",
"vest",
"vesthelm",
"nvgs"
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("drop","cmdDrop");
register_forward(FM_SetModel,"fwSetModel",1);
clearWeapons();
for(new i=0; i<sizeof commands; ++i)
register_clcmd(commands[i], "block");
}
public cmdDrop(id){
client_print(id, print_center, "Zakaz wyrzucania broni!");
return PLUGIN_HANDLED;
}
public block(id)
return PLUGIN_HANDLED;
public clearWeapons(){
new ent = engfunc(EngFunc_FindEntityByString, -1, "classname", CLASSNAME);
while (ent){
disable_weapon(ent);
ent = engfunc(EngFunc_FindEntityByString, ent, "classname", CLASSNAME);
}
}
public fwSetModel(ent, const szModel[]){
if(contain(szModel, "c4"))
return FMRES_IGNORED;
if(!pev_valid(ent))
return FMRES_IGNORED;
new szClassName[32];
pev(ent, pev_classname, szClassName, 31);
if(equal(szClassName, "weaponbox")){
disable_weapon(ent);
return FMRES_OVERRIDE;
}
return FMRES_IGNORED;
}
disable_weapon(ent){
if(!pev_valid(ent))
return;
set_pev(ent, pev_solid, SOLID_NOT);
fm_set_rendering(ent,kRenderFxNone, 0,0,0, kRenderTransTexture,0);
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16) {
new Float:RenderColor[3]
RenderColor[0] = float(r)
RenderColor[1] = float(g)
RenderColor[2] = float(b)
set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, RenderColor)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))
return 1
}
Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych


Dodatki SourceMod






zakaz_wyrzucania.amxx






