Raised This Month: $ Target: $400
 0% 

Block player from spawning


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LaineN
Veteran Member
Join Date: Mar 2008
Location: Sweden
Old 04-10-2010 , 08:09   Block player from spawning
Reply With Quote #1

I am trying to block a specific player from spawning, but I can't get it to work. I know I can let him spawn, then kill him, but I hope there are any other, more efficient way.

I've tested this:

Code:
#include < amxmodx > #include < hamsandwich > public plugin_init( ) {     RegisterHam( Ham_Spawn, "player", "ForwardPlayerSpawnPre" ); } public ForwardPlayerSpawnPre( id ) {     return HAM_SUPERCEDE; }

But it doesn't work.

I've also tryed it with Orpheu (http://forums.alliedmods.net/showpos...&postcount=360)
__________________
Bollnas Team - HideNSeek

See all of Bollnas Team's HideNSeek
servers at
http://bollnasteam.se/!


Last edited by LaineN; 04-10-2010 at 08:11.
LaineN is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 04-10-2010 , 08:19   Re: Block player from spawning
Reply With Quote #2

ive been dicking about with this for a while now
ive never found an efficient way to do it though
the best i have is below, but it only apears to work every couple of times on cs_italy
(i havent tried it on any other cs_ maps, but it dosent work at all on de_ maps)

PHP Code:
ExecuteHamB(Ham_Killedididid);
set_pev(idpev_deadflagDEAD_DEAD);
cs_set_user_team(idcs_get_user_team(id));
return 
HAM_SUPERCEDE
__________________
minimiller is offline
Send a message via MSN to minimiller
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2010 , 10:22   Re: Block player from spawning
Reply With Quote #3

You should ever filter the very first spawn that happen between client_connect and client_putinserver, and don't supercede that spawn.
Else, supercede is enough.



Quote:
Originally Posted by minimiller View Post
PHP Code:
ExecuteHamB(Ham_Killedididid); 

Lol, 3rd param is bGib and can take value 0, 1, 2
0 = never gib
1 = should be related to dmg_bit or dmg value
2 = always gib

PHP Code:
ExecuteHam(Ham_Killedidid0); 
Anyway this is not needed.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 04-10-2010 at 10:25.
ConnorMcLeod is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 04-10-2010 , 10:41   Re: Block player from spawning
Reply With Quote #4

Quote:
Originally Posted by ConnorMcLeod View Post
Lol, 3rd param is bGib and can take value 0, 1, 2
0 = never gib
1 = should be related to dmg_bit or dmg value
2 = always gib
my bad
i guess it was working for me cos i was testing it on my own so i was id 1
__________________
minimiller is offline
Send a message via MSN to minimiller
LaineN
Veteran Member
Join Date: Mar 2008
Location: Sweden
Old 04-10-2010 , 15:13   Re: Block player from spawning
Reply With Quote #5

Quote:
Originally Posted by ConnorMcLeod View Post
You should ever filter the very first spawn that happen between client_connect and client_putinserver, and don't supercede that spawn.
Else, supercede is enough.
Thanks, it worked. But not perfect.
The player who got superceded spawn comes into a state that it can't spectate any player (only free look), no matter of mp_forcechasecam. He is like alive, but dead (dead in scoreboard too).
__________________
Bollnas Team - HideNSeek

See all of Bollnas Team's HideNSeek
servers at
http://bollnasteam.se/!

LaineN is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 04-10-2010 , 15:15   Re: Block player from spawning
Reply With Quote #6

With Orpheu and FPlayerCanRespawn, it works fine.
__________________
Arkshine is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-10-2010 , 15:27   Re: Block player from spawning
Reply With Quote #7

Try to also supercede Ham_CS_RoundRespawn, but all the time, no need to filter.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
LaineN
Veteran Member
Join Date: Mar 2008
Location: Sweden
Old 04-10-2010 , 15:49   Re: Block player from spawning
Reply With Quote #8

Quote:
Originally Posted by Arkshine View Post
With Orpheu and FPlayerCanRespawn, it works fine.
Can you show how to do it with Orpheu?

Quote:
Originally Posted by ConnorMcLeod View Post
Try to also supercede Ham_CS_RoundRespawn, but all the time, no need to filter.
I will try it.

EDIT:
It worked better. But I saw that even when the spawn is blocked, the player model are spawned.
__________________
Bollnas Team - HideNSeek

See all of Bollnas Team's HideNSeek
servers at
http://bollnasteam.se/!


Last edited by LaineN; 04-10-2010 at 16:04.
LaineN is offline
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 14:14.


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