Wow, cant believe I missed that lol...
anyway I am now having an issue with the callback not being run.
PHP Code:
HookEntities()
{
new dungbell = EntRefToEntIndex(FindEnt("logic_relay", "dungbellxp"))
HookSingleEntityOutput(dungbell, "Trigger", DungBell)
PrintToServer("Dungbell: %i", dungbell)
}
FindEnt(const String:classname[], const String:name[])
{
new ent = -1;
while(true)
{
ent = FindEntityByClassname(ent, classname)
if(ent == -1) break
new String:entName[65]
GetEntityTargetName(ent, entName, sizeof(entName))
if(StrEqual(entName, name))
{
return ent;
}
}
}
public DungBell(const String:output[], caller, activator, Float:delay)
{
PrintToChatAll("DungBell - Activator: %i", activator)
if(activator <= MaxPlayers && IsClientInGame(activator))
{
RewardXP(activator, SKILL_STR, 10)
}
}
I receive no error, and the entity hooked is '2064', which I assume is the correct ID.
My map setup:
trigger_multiple is activated, which calls 'Trigger' on a logic_relay called 'dungbellxp' which calls 'Trigger' on a logic_relay called 'XP'.
The last call is to create an output that can be hooked.
Any ideas why it isnt calling?
Thanks in advanced.