Raised This Month: $ Target: $400
 0% 

Block Player Spawn on NewRound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 12-22-2015 , 10:11   Re: Block Player Spawn on NewRound
Reply With Quote #1

Solved. Here's the solution
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <fun>

#define PLUGIN "Stay Dead"
#define VERSION "1.0"
#define AUTHOR "RFP"

public plugin_init(){
        
register_plugin(PLUGIN,VERSION,AUTHOR)
     
    
register_event("ResetHUD","block_spawn","be","1=1")
    
        
}

public 
block_spawn(id)
{

    
set_pev(idpev_health0.0);
    
set_pev(idpev_deadflagDEAD_DEAD);
    
set_msg_block(g_msgid_ClCorpseBLOCK_ONCE)

    
//client_print(id, print_chat, "[AMXX] You are not allowed to respawn!")



Here "HAM" is not needed because i tested newround , resethud and ham spawn , in which order they go and here's the order:

1.NewRound
2.ResetHUD
3.HamSpawn


I think ham_spawn didn't work because it's called after the player's spawn. And here we go. Resethud works nice.

Note: Here's also a small bug. After dead flags are set the player doesnt respawn (he's remains dead spectator in his team) but a floating model is respawned. I want to fix that. I'll find and come with an edit but if someone knows how to delete that floating model i'll accept ur help.

EDIT: FOUND how to remove that flying model . Code UPDATED!

Last edited by siriusmd99; 12-22-2015 at 12:30.
siriusmd99 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-22-2015 , 11:54   Re: Block Player Spawn on NewRound
Reply With Quote #2

That's basically the same code Exolent posted and his code worked also. You must have tested it wrong.

Edit: It has the same problem as the code you posted.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 12-22-2015 at 12:05.
wickedd 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 18:08.


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