Raised This Month: $32 Target: $400
 8% 

[REQ] Respawn when somebody join


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 06-24-2012 , 19:40   [REQ] Respawn when somebody join
Reply With Quote #1

Hello there

I want a simple plugin that respawn player when he connect only, if he is dead it will not respawn him.

Last edited by Moody92; 06-24-2012 at 19:40.
Moody92 is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-25-2012 , 00:54   Re: [REQ] Respawn when somebody join
Reply With Quote #2

Try this:

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

public plugin_init()
{
register_plugin("Simple Respawn","1.0","<VeCo>")

register_clcmd("joinclass","ClCmd_Player_JoinClass")
}

public 
ClCmd_Player_JoinClass(idset_task(1.0,"Player_Respawn",id)

public 
Player_Respawn(id)
{
if(!
is_user_connected(id) || is_user_alive(id)) return

ExecuteHamB(Ham_CS_RoundRespawn,id)

__________________

Last edited by <VeCo>; 06-25-2012 at 00:54.
<VeCo> is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 06-25-2012 , 10:29   Re: [REQ] Respawn when somebody join
Reply With Quote #3

Not working

EDIT :

I was searching deeper and I found zombie plague plugin, I converted it to normal plugin.
here is the plugin if anybody want it


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

#define PLUGIN "Respawn on connect"
#define VERSION "1.0"
#define AUTHOR "ILUSION-EDITED-BY-FL00D"

new respawn_connect

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
respawn_connect register_cvar("respawn_connect""1")
    
register_cvar("respawn_version"VERSIONFCVAR_SERVER)
}

public 
client_putinserver(id)
{
    
set_task(10.0"check"id)
}

public 
check(id)
{
    if (
get_pcvar_num(respawn_connect))
    {
        if (!
is_user_alive(id)
        )
            
ExecuteHamB(Ham_CS_RoundRespawn,id)
        }

Source

Last edited by Moody92; 06-25-2012 at 12:12.
Moody92 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 11:38.


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