Raised This Month: $ Target: $400
 0% 

[SOLVED][HAMSANDWICH] Failed to retrieve classtype...


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dr.G
Senior Member
Join Date: Nov 2008
Old 01-10-2009 , 09:56   [SOLVED][HAMSANDWICH] Failed to retrieve classtype...
Reply With Quote #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:
[HAMSANDWICHFailed 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",VERSIONAUTHOR)
 
register_cvar("no_church_campers"VERSIONFCVAR_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(entityclient)
{
 if(
get_pcvar_num(p_enable) && is_user_connected(client) && is_user_alive(client))
 
 
dod_set_pronestate(client0);
 
//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(clientflag
{
 
set_pev(clientpev_iuser3flag );
}
public 
Zone1() // enter to church
{
 
 new 
ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))
 
//STOP if we cant create the ent... safety
 
if(!ent)
  return 
PLUGIN_HANDLED 
 
 set_pev
(entpev_targetname"no_prone"
 
dllfunc(DLLFunc_Spawnent)
 
 new 
Float:origin[3] = { -547.0, -260.0, -188.0 //center box?
 
set_pev(entpev_originorigin)
 
 
set_pev(entpev_movetypeMOVETYPE_STEP////stay on the ground? 
 
set_pev(entpev_solidSOLID_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_SetSizeentg_fMaxsg_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.
Dr.G is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode