Raised This Month: $68 Target: $400
 17% 

Prevent player from spawning (just ignore him)


Post New Thread Reply   
 
Thread Tools Display Modes
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 10:15   Re: Prevent player from spawning (just ignore him)
Reply With Quote #11

I changed to fwHamPlayerSpawn and still not working.
__________________
mhvtnns
MihailoZ is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-18-2019 , 10:24   Re: Prevent player from spawning (just ignore him)
Reply With Quote #12

chaning the funciton name wont change anything
try with
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
->
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 0)

if that doest work, then add in POST (meaning 1 last argument) set_task of 0.1 sec for user_silentkill( id )
__________________
KZ Public Autocup

Private works:
KZ Melee & 1v1 Cup plugin & MapPool (like for XJ)
PrimeKZ
PrimeBAN
Checkpoin zones for KZ (& DR)
Deathrun Timer
JocAnis is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 10:37   Re: Prevent player from spawning (just ignore him)
Reply With Quote #13

Quote:
Originally Posted by JocAnis View Post
add in POST (meaning 1 last argument) set_task of 0.1 sec for user_silentkill( id )
Could you explain please?
__________________
mhvtnns
MihailoZ is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-18-2019 , 10:42   Re: Prevent player from spawning (just ignore him)
Reply With Quote #14

Code:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) 

public fwHamPlayerSpawnPost(id) {
	if(is_user_connected(id))
	if(get_gametime() - g_fRoundTime >= 40.0) {
	
		set_task( 0.1, "killhim", id )
		
	}
	
	return PLUGIN_CONTINUE;
}
public killhim( id )
	user_silentkill( id )
__________________
KZ Public Autocup

Private works:
KZ Melee & 1v1 Cup plugin & MapPool (like for XJ)
PrimeKZ
PrimeBAN
Checkpoin zones for KZ (& DR)
Deathrun Timer
JocAnis is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 11:18   Re: Prevent player from spawning (just ignore him)
Reply With Quote #15

Quote:
Originally Posted by JocAnis View Post
Code:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1) 

public fwHamPlayerSpawnPost(id) {
	if(is_user_connected(id))
	if(get_gametime() - g_fRoundTime >= 40.0) {
	
		set_task( 0.1, "killhim", id )
		
	}
	
	return PLUGIN_CONTINUE;
}
public killhim( id )
	user_silentkill( id )
It works but:

- there is 3rd person camera showing his death.
- player spawns and dies instantly

What I need is that when player joins the game after 40 seconds, that he countinues spectating another player. No indication that he is killed.
__________________
mhvtnns
MihailoZ is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 11:30   Re: Prevent player from spawning (just ignore him)
Reply With Quote #16

SOLVED with this plugin: https://forums.alliedmods.net/showpo...7&postcount=29
__________________
mhvtnns
MihailoZ is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 11:36   Re: Prevent player from spawning (just ignore him)
Reply With Quote #17

One more question, I don't want to open 1000 topics.

I tried searching for this plugin but with no success.

How to hide round timer from top-right while dead?


EDIT: This plugin I sent above, it has a problem. When I slay all players, it says "T wins (the default sound)" and when new round starts, it does not spawn players at all.
__________________
mhvtnns

Last edited by MihailoZ; 09-18-2019 at 11:52.
MihailoZ is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-18-2019 , 12:17   Re: Prevent player from spawning (just ignore him)
Reply With Quote #18

try like first reply told you..:
Code:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 0)

public fwHamPlayerSpawnPost(id) {
	if(is_user_connected(id))
	if(get_gametime() - g_fRoundTime >= 40.0) {
	
		return HAM_SUPERCEDE;
		
	}
	
	return PLUGIN_CONTINUE;
}
__________________
KZ Public Autocup

Private works:
KZ Melee & 1v1 Cup plugin & MapPool (like for XJ)
PrimeKZ
PrimeBAN
Checkpoin zones for KZ (& DR)
Deathrun Timer

Last edited by JocAnis; 09-18-2019 at 12:17.
JocAnis is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-18-2019 , 13:29   Re: Prevent player from spawning (just ignore him)
Reply With Quote #19

Quote:
Originally Posted by JocAnis View Post
try like first reply told you..:
Code:
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 0)

public fwHamPlayerSpawnPost(id) {
	if(is_user_connected(id))
	if(get_gametime() - g_fRoundTime >= 40.0) {
	
		return HAM_SUPERCEDE;
		
	}
	
	return PLUGIN_CONTINUE;
}
It has 3rd persom view of player's death.
__________________
mhvtnns
MihailoZ is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 09-18-2019 , 16:02   Re: Prevent player from spawning (just ignore him)
Reply With Quote #20

Quote:
Originally Posted by JocAnis View Post
@OciXCrom, i would aprecciate if you can make any example with get_systime (how i undestood, systime must be used for like gag/ban/similar plugins
get_gametime() counts the time from the beginning of the map, so you can't really use it reliably to store data after mapchange because it will be set to 0 as soon as the next map starts.

get_systime() shows the current time on the server (the actual clock in real life) in unix format (number of seconds that have passed from January 1st, 1970), so you can safely use it after the map changes because the time will always be real instead of getting reset to 0 when the map starts.

So, for example, if you want to store the duration of a ban, you will need to use get_systime(), because you need the time duration in real life seconds.
__________________

Last edited by OciXCrom; 09-18-2019 at 16:04.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
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 16:42.


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