|
Senior Member
|

01-10-2009
, 09:56
[SOLVED][HAMSANDWICH] Failed to retrieve classtype...
|
#1
|
I wanted to make a plugin that made it harder to camp at/on the church in dod_avalanche (yes i play DoD ;)). First i created a zone where u cant prone, but i get and error while detecting the classname of the new ent name with Ham...
PHP Code:
[HAMSANDWICH] Failed to retrieve classtype for "no_prone", hook for "FwdTouch" not active.
So it doesnt detect the entity.. Any idea how to solve this?
PHP Code:
#include <amxmisc> #include <amxmodx> #include <dodx> #include <fakemeta> #include <hamsandwich> #define PLUGIN "No Church Campers" #define VERSION "1.0 by Dr.G - www.clan-go.net" #define AUTHOR "Dr.G" new p_enable public plugin_init() { new check_map[32] get_mapname(check_map,31) if(equali(check_map,"dod_avalanche")) { Zone1() //Zone2() } register_plugin("no_church_campers",VERSION, AUTHOR) register_cvar("no_church_campers", VERSION, FCVAR_SERVER|FCVAR_SPONLY) //For testing //RegisterHam(Ham_Touch, "dod_capture_area", "FwdTouch",0) this IS tested and it worked perfect! RegisterHam(Ham_Touch, "no_prone", "FwdTouch",0) p_enable = register_cvar("no_church_campers","1") // Plugin On | Off } public FwdTouch(entity, client) { if(get_pcvar_num(p_enable) && is_user_connected(client) && is_user_alive(client)) dod_set_pronestate(client, 0); //For testing //client_print(client,print_chat,"You Can't Prone Here! You Damn Camper!") return HAM_IGNORED } // stock for dod_noprone by Tatsu, thanks! stock dod_set_pronestate(client, flag) { set_pev(client, pev_iuser3, flag ); } public Zone1() // enter to church { new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) //STOP if we cant create the ent... safety if(!ent) return PLUGIN_HANDLED set_pev(ent, pev_targetname, "no_prone") dllfunc(DLLFunc_Spawn, ent) new Float:origin[3] = { -547.0, -260.0, -188.0 } //center box? set_pev(ent, pev_origin, origin) set_pev(ent, pev_movetype, MOVETYPE_STEP) ////stay on the ground? set_pev(ent, pev_solid, SOLID_NOT) // TRIGGER? //new Float:g_fMaxs[3] = { -471.0 , -287.0 , -156.0 } //new Float:g_fMins[3] = { 0.0 , 0.0 , 100.0 } new Float:g_fMaxs[3] = { -687.0, -303.0, -187.0 } new Float:g_fMins[3] = { -261.0 , -207.0 , 13.0 } engfunc(EngFunc_SetSize, ent, g_fMaxs, g_fMins) return PLUGIN_HANDLED } /* public Zone2() // top of church { //mortar field new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")) //STOP if we cant create the ent... safety if(!ent) return PLUGIN_HANDLED set_pev(ent, pev_targetname, "no_prone") dllfunc(DLLFunc_Spawn, ent) new Float:origin[3] = { -425.0, -17.5, 356.0 } //center box? set_pev(ent, pev_origin, origin) set_pev(ent, pev_movetype, MOVETYPE_FLY) set_pev(ent, pev_solid, SOLID_NOT) // TRIGGER? new Float:g_fMaxs[3] = { -495.0 , 191.0 , 311.0 } // oy oy new Float:g_fMins[3] = { -328.0 , -159.0 , 215.0 } engfunc(EngFunc_SetSize, ent, g_fMaxs, g_fMins) return PLUGIN_HANDLED } */
__________________
Last edited by Dr.G; 01-12-2009 at 19:25.
|
|