Raised This Month: $ Target: $400
 0% 

Correctly block spawn


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 05-21-2010 , 07:54   Correctly block spawn
#1

How I can correctly block spawn on the map?
Player select Team (CT/T), select Model and spawn on map now, how I can block it? Need to block spawn and move player to "Dead Spectators" (player in selected team, but he dead).

Thanks...
Phant is offline
Send a message via ICQ to Phant
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-21-2010 , 09:08   Re: Correctly block spawn
#2

PHP Code:
public plugin_init() {
    
RegisterHam(Ham_Spawn"player""fwdHamSpawn");
}
public 
fwdHamSpawn(id) {
    
    
user_kill(id,); //so he doesn't get +1 death (thx unny)
    
return HAM_IGNORED;
    

__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!

Last edited by Brreaker; 05-21-2010 at 09:11.
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-21-2010 , 15:50   Re: Correctly block spawn
#3

Quote:
Originally Posted by Brreaker View Post
PHP Code:
public plugin_init() {
    
RegisterHam(Ham_Spawn"player""fwdHamSpawn");
}
public 
fwdHamSpawn(id) {
    
    
user_kill(id,); //so he doesn't get +1 death (thx unny)
    
return HAM_IGNORED;
    

You can't kill a user before he's spawned. That forward is registered for before he spawns. If you want to register a post ham hook, make the fourth parameter 1 in the registry.

This topic has been discussed before. Search. (I believe minimiller started it, but there was a very recent one in the past month or so)
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 05-21-2010 , 09:40   Re: Correctly block spawn
#4

Kill — not correctly method.
Phant is offline
Send a message via ICQ to Phant
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-21-2010 , 09:42   Re: Correctly block spawn
#5

You want them dead.How do you want them to get dead without getting killed? :-?
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
unnyquee
Senior Member
Join Date: Jun 2009
Location: Constanta, Romania
Old 05-21-2010 , 09:47   Re: Correctly block spawn
#6

Returning HAM_SUPERCEDE in Ham_Spawn Pre, but I don't think it is a really good idea :/
..or.. I might be wrong :/

Or you might just register Ham_Spawn in Post and kill (or silent_kill) the client.
__________________
unnyquee is offline
Closed Thread



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 03:35.


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