Vizitato Vizitator
| Subiect: Bomba sub forma de cozonac Dum Apr 12, 2009 4:26 pm | |
| Descriere:
Acest plugin va face ca bomba dumneavoastra de pe server Code: #include #include
#define PLUGIN "bomba cozonac" #define VERSION "1.0" #define AUTHOR "tuty"
new const gC4Model[] = "models/w_cozonac.mdl";
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR); register_forward(FM_SetModel, "Bomb_Model"); register_forward(FM_Think, "c4place"); } public plugin_precache() { engfunc(EngFunc_PrecacheModel, gC4Model); } public c4place(Ent) {
if(!pev_valid(Ent)) return FMRES_IGNORED; static sClassName[32]; pev(Ent, pev_classname, sClassName, sizeof sClassName -1); if(!strcmp(sClassName, "1")) { engfunc(EngFunc_RemoveEntity, Ent); } return FMRES_IGNORED; } public Bomb_Model(Ent, const szModel[]) { if(!pev_valid(Ent)) return FMRES_IGNORED;
if(!strcmp(szModel, "models/w_c4.mdl")) { engfunc(EngFunc_SetModel, Ent, gC4Model); return FMRES_SUPERCEDE; } return FMRES_IGNORED; |
|