Raised This Month: $ Target: $400
 0% 

TS Spawning


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gfwgtt
New Member
Join Date: Dec 2006
Old 07-03-2007 , 15:31   TS Spawning
Reply With Quote #1

How can I prevent a player from spawning in The Specialists dm ?

I tried:

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>

#define BEEP "misc/beep2.wav"
public plugin_precache()
{
    precache_sound(BEEP)
    register_forward (FM_PlayerPreThink, "fn_hookprethink")
    return PLUGIN_HANDLED
}

public plugin_init() {
    register_plugin("Block Spawn Test", "1", "...")
    register_concmd("tog_atk", "toggle_attack")
}

new bool:allow_spawn = true;

public toggle_attack(id,level,cid)
{
    allow_spawn = !allow_spawn
    emit_sound(id,0,BEEP,1.0,ATTN_NORM,0,PITCH_NORM)
    return PLUGIN_HANDLED
}

public fn_hookprethink(id)
{
    if(!is_user_alive(id) && !allow_spawn && (get_user_button (id) & IN_ATTACK))
    {
        entity_set_int (id,EV_INT_button,get_user_button (id) & ~IN_ATTACK)
        client_print(id,print_chat,"You may not spawn.")
        return FMRES_SUPERCEDE
    }
    
    return FMRES_IGNORED
}
The toggle function works, and right after death, if I +attack I get the "You may not spawn." message, but I can still respawn.

What should I do to block respawning in ts ?
gfwgtt is offline
Timoses
Member
Join Date: Mar 2006
Location: Germany, NRW
Old 02-03-2009 , 01:53   Re: TS Spawning
Reply With Quote #2

Hi, I'm trying to figure out the same problem. Have you come to a solution?
Timoses is offline
Send a message via ICQ to Timoses Send a message via MSN to Timoses
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 21:34.


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