Raised This Month: $ Target: $400
 0% 

Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Choose_Your_Destiny
Senior Member
Join Date: May 2011
Old 12-06-2011 , 10:56   Respawn
Reply With Quote #1

I have a deahrun sw. Players entering the game later is dead.

I need plugin.players entering the game immediately spawn again
Choose_Your_Destiny is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-06-2011 , 11:10   Re: Respawn
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define VERSION "1.0"

new Float:tasktime[33] = 3.0

public plugin_init() {
    
register_plugin("Respawn"VERSION"NapoleoN#")
}

public 
client_putinserver(id) {
    
set_task(tasktime[id], "CheckRespawn"id)
}

public 
CheckRespawn(iPlayer) {
    if(
cs_get_user_team(iPlayer) != CS_TEAM_UNASSIGNED || cs_get_user_team(iPlayer) != CS_TEAM_SPECTATOR) {
        
ExecuteHamB(Ham_CS_RoundRespawniPlayer)
    } else {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED

Untested but it should work.
If any bugs, please tell me.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-07-2011 , 01:14   Re: Respawn
Reply With Quote #3

Napoleon plugin won't work.

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "Late Join Respawn"

#define XO_PLAYER                    5
#define m_iMenuCode                205

#define Menu_ChooseAppearance    3
#define cs_get_user_menu(%0)    get_pdata_int(%0, m_iMenuCode, XO_PLAYER)

new g_bitRespawnQueue
#define put_user_in_respawn_queue(%0)                    g_bitRespawnQueue |= 1<<(%0&31)
#define is_user_in_respawn_queue(%0)                    g_bitRespawnQueue & 1<<(%0&31)
#define remove_user_from_respawn_queue(%0)        g_bitRespawnQueue &= ~(1<<(%0&31))

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
register_clcmd("joinclass""ClCmd_CoudBeChoosingAppearance")
    
register_clcmd("menuselect""ClCmd_CoudBeChoosingAppearance")
}

public 
client_putinserverid )
{
    
put_user_in_respawn_queueid )
}

public 
ClCmd_CoudBeChoosingAppearanceid )
{
    if( 
is_user_in_respawn_queue(id) && cs_get_user_menu(id) == Menu_ChooseAppearance )
    {
        
remove_user_from_respawn_queueid )
        
set_task(0.1"Respawn_User"id)
    }
}

public 
Respawn_Userid )
{
    if( !
is_user_alive(id) && is_user_connected(id) )
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid)
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 20:58.


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