Raised This Month: $51 Target: $400
 12% 

New Round / Player Spawn / Round Start / Round End - do Not mess it


Post New Thread Reply   
 
Thread Tools Display Modes
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 03-06-2008 , 19:08   Re: New Round/Player Spawn/Round Start/Round End - do Not mess it
Reply With Quote #71

Found a bug...

register_clcmd() dosn't detect if player is using something like
Code:
alias hack_the_hud "something;fullupdate"
But detection of it in client_command(id) works fine. Plus works for "record" cmd - sends "fullupdate" cmd in this forward, what is realy good. =)
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 03-06-2008 at 19:44.
MPNumB is offline
Send a message via Skype™ to MPNumB
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-06-2008 , 19:44   Re: New Round/Player Spawn/Round Start/Round End - do Not mess it
Reply With Quote #72

'fullclientupdate' ??? typo ???

Also a player can type command "record" while recording a demo, so no ResetHUD will be called.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 03-22-2008 , 09:05   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #73

Rewrote the article - mainly the "Player Spawn" section:
  • Added the new efficient method.
  • The old method is more efficient now:
    • No "fullupdate" command block anymore.
    • "Alive" check is moved to the function itself.
  • Notified about register_event() bug (versions below 1.80).
  • Notified about potential crash on some actions.
Quote:
register_clcmd() dosn't detect if player is using something like

Code:
alias hack_the_hud "something;fullupdate"
Can't reproduce that.

Last edited by VEN; 03-22-2008 at 09:13.
VEN is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-22-2008 , 13:17   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #74

yay....I have found this tut really helpful, but I can't +karma u again

I have to ask one thing though.
Something tells me that the more AMXX modules are loaded on a server, the more poorly it will run. Now I see that your "more efficient" player spawn method loads the new and very rarely used hamsandwich module.
Wouldn't you agree that it would still be better to use the ResetHud way if your server doesn't have the hamsandwich module already loaded? Cause frankly I don't think it makes sense to load a new module just to use its functionalities once if there is another way to do the same thing without it.
__________________
hoboman is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 03-22-2008 , 14:33   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #75

Correct me if I'm wrong but shouldn't you be using Ham_CS_RoundRespawn and not Ham_Spawn.

Not only that but I thought I read somewhere cz bots don't get picked up as "player", but as something else unlike other bots. Strange they would have another classname, oh here it is: http://forums.alliedmods.net/showthread.php?t=66498
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
VEN
Veteran Member
Join Date: Jan 2005
Old 03-23-2008 , 02:38   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #76

(For CS players)
Ham_Spawn is called on server join, spawn and respawn. Ham_CS_RoundRespawn is called only on respawn and not on actual spawn. Though in CS in the most cases it would be enough, Ham_Spawn method is still more common and more mod-independent.

Quote:
new and very rarely used hamsandwich module
This statement is relative. A year or two ago the fakemeta was in the same state. And now you see it used nearly in every new plugin. Someone may code a whole new mod with hamsandwich because only with that module it can be done. Someone want to strip weapons on spawn and don't want to crash the server while doing it in ResetHUD, don't want to code complex workaround to "jump" from middle of Spawn execution to its end to avoid crash, don't want to use obsolete inaccurate set_task() method instead.

The message hooking method is obsolete. It was heavily used in AMX Mod. But now AMX Mod X provides more appropriate/accurate/efficient "direct" methods of hooking. This is a progress and you can't stop it because people always trying to find a better technical methods, trying to achieve a better quality.

Last edited by VEN; 03-23-2008 at 03:17.
VEN is offline
PoSiTiOn Of PoWeR
BANNED
Join Date: May 2008
Location: RO
Old 05-18-2008 , 17:44   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #77

wow this looks very cool ..
very useful


Last edited by PoSiTiOn Of PoWeR; 05-18-2008 at 17:46.
PoSiTiOn Of PoWeR is offline
Send a message via Yahoo to PoSiTiOn Of PoWeR
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 06-29-2008 , 22:23   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #78

If we are to use Ham_Spawn, what is the best way to RegisterHamFromEntity for CZ bots? since they do not count in:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

--------
Edit: Also both bots for cs and cz bots, Ham_Spawn is called multiple (3 i think) times on their first spawn. And they are alive even before their are set on a team. I've opted to use Ham_CS_RoundRespawn for bots to avoid this.

Last edited by vittu; 06-30-2008 at 19:57.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 07-02-2008 , 16:44   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #79

Quote:
Originally Posted by vittu View Post
If we are to use Ham_Spawn, what is the best way to RegisterHamFromEntity for CZ bots? since they do not count in:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)

--------
Edit: Also both bots for cs and cz bots, Ham_Spawn is called multiple (3 i think) times on their first spawn. And they are alive even before their are set on a team. I've opted to use Ham_CS_RoundRespawn for bots to avoid this.
Yeah you need to use RegisterHamFromEntity only once for a CZ bot once he gets into the server, and then the forwards will be triggered properly for them.
Don't really have time to explain now, but if you're unsure on how to do it you can take a look at my Zombie Plague plugin.
__________________
MeRcyLeZZ is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 07-03-2008 , 01:42   Re: New Round / Player Spawn / Round Start / Round End - do Not mess it
Reply With Quote #80

Quote:
Originally Posted by MeRcyLeZZ View Post
Yeah you need to use RegisterHamFromEntity only once for a CZ bot once he gets into the server, and then the forwards will be triggered properly for them.
Don't really have time to explain now, but if you're unsure on how to do it you can take a look at my Zombie Plague plugin.
I just said that... You misunderstand, I was asking VEN for a consensus for best method to do so not how to do it.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Reply



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 23:20.


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