Raised This Month: $ Target: $400
 0% 

Hook players spawn (Half-Life)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 10-19-2010 , 08:43   Hook players spawn (Half-Life)
Reply With Quote #1

Please, help. I find a good way to cath the player spawn.
And I don't want to use Hamsandwich.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-19-2010 , 08:46   Re: Hook players spawn (Half-Life)
Reply With Quote #2

Well Hamsandwich is a really nice way to do it ... ,
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-19-2010 , 08:47   Re: Hook players spawn (Half-Life)
Reply With Quote #3

I don't want to use Hamsandwich

Please explain why ?
__________________
Arkshine is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 10-19-2010 , 08:55   Re: Hook players spawn (Half-Life)
Reply With Quote #4

I use it now. But my plugin was made for AG (Half-Life Adrenaline Gamer Mod). Most of AG servers running with amxx, but Hamsandwich doesn't work with AG without hamdata.ini edit. The pugin is very simple. And I want to make installation easier.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-19-2010 , 09:02   Re: Hook players spawn (Half-Life)
Reply With Quote #5

If you can't use Ham, you sill can use Orpheu, just need to add the game and it should work. Hooking CBasePlayer::Spawn() (what does Ham and what can do orpheu) is the best way to hook at player spawn.
__________________
Arkshine is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 10-19-2010 , 09:07   Re: Hook players spawn (Half-Life)
Reply With Quote #6

Hm. I can use Hamsandwich. But server owner need to edit hamdata.ini to make it work.
Orpheu - it is more difficult.
Is there another way? With fakemeta or ResetHUD event.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 10-19-2010 , 09:13   Re: Hook players spawn (Half-Life)
Reply With Quote #7

Is that correct?

PHP Code:
public plugin_init()
{
    
register_clcmd"fullupdate""fullupdate_block" )
    
register_event("ResetHUD""player_spawn""be")
 }

 
public 
player_spawn(id)
{
    
    
//.......
    
}


public 
fullupdate_block(id)
    return 
PLUGIN_HANDLED_MAIN 
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 10-19-2010 , 09:23   Re: Hook players spawn (Half-Life)
Reply With Quote #8

Try to use a task:

PHP Code:
register_event"ResetHUD""player_spawn_pre""be" )
 
public 
player_spawn_pre(id)
{
    
set_task0.8"player_spawn_post"id )
}

public 
player_spawn_post(id)
{
    
client_printid3"Spawn!!" )


dFF is offline
Hellrock
Junior Member
Join Date: Sep 2010
Location: Ukraine
Old 10-19-2010 , 09:29   Re: Hook players spawn (Half-Life)
Reply With Quote #9

[EN]
In attached file u can find hamdata for AG, miniAG, OP4!

[RU]
В прикреплёном файле найдешь hamdata для AG, miniAG, OP4!
Attached Files
File Type: zip hamdata.zip (17.5 KB, 134 views)
Hellrock is offline
Flipper_SPb
Senior Member
Join Date: Jun 2009
Location: Worldspawn
Old 10-19-2010 , 09:48   Re: Hook players spawn (Half-Life)
Reply With Quote #10

Quote:
Originally Posted by Hellrock View Post
[EN]
In attached file u can find hamdata for AG, miniAG, OP4!

[RU]
В прикреплёном файле найдешь hamdata для AG, miniAG, OP4!
Thanks. But I can just replace @section valve windows with @section ag windows in hamdata.ini It's not a problem.
Flipper_SPb is offline
Send a message via ICQ to Flipper_SPb
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 10:26.


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