Raised This Month: $ Target: $400
 0% 

RegisterHamFromEntity calling too many times.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 07-23-2008 , 03:50   RegisterHamFromEntity calling too many times.
Reply With Quote #1

PHP Code:
public client_putinserver(id)
{
    if(
is_user_bot(id))
        
set_task(0.1"delayedBotRegister"id)
}

public 
delayedBotRegister(id)
{
    
RegisterHamFromEntity(Ham_Spawnid"postSpawn"1)
    
RegisterHamFromEntity(Ham_TakeDamageid"preDamage")
    
RegisterHamFromEntity(Ham_Killedid"postKilled"1)

When I do this, it calls the functions way too many times. I was wondering if I'm doing anything wrong. And yes, it is only dealing with bots, I use RegisterHam for human players.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-23-2008 , 04:02   Re: RegisterHamFromEntity calling too many times.
Reply With Quote #2

You have to register one time. Take a look in gungame.
__________________
Arkshine is offline
soccdoodcss
Veteran Member
Join Date: Nov 2006
Location: Wisconsin
Old 07-23-2008 , 04:40   Re: RegisterHamFromEntity calling too many times.
Reply With Quote #3

Aaaaah... I see how it works. Thanks a lot.
__________________
"Now safe beneath their wisdom and their feet.
Here I will teach you truly how to sleep."
soccdoodcss is offline
Send a message via AIM to soccdoodcss
Reply


Thread Tools
Display Modes

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 05:37.


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