Raised This Month: $51 Target: $400
 12% 

[REQ] Simple Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skatzfz
Senior Member
Join Date: Apr 2014
Old 06-12-2014 , 14:19   [REQ] Simple Respawn
Reply With Quote #1

Hi guys!

I tested about 5 plugins for respawn but no one gives me what I needed.

I just need a plugin that respawn like deathmatch, when you join a tem you automatically respawn, when you die you respawn too, can someone make a plugin that does that?

Sorry for my terrible english ahah

Thanks!
skatzfz is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 06-12-2014 , 14:30   Re: [REQ] Simple Respawn
Reply With Quote #2

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define VERSION "0.0.1" #define PLUGIN "Death Instant Respawn" public plugin_init() {     register_plugin(PLUGIN, VERSION, "ConnorMcLeod")     RegisterHam(Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", true) } public Ham_CBasePlayer_Killed_Post( id ) {     set_pev(id, pev_deadflag, DEAD_RESPAWNABLE) }
__________________
Like my clean plugins and work?
Baws is offline
ANTICHRISTUS
kingdom of weird stuff
Join Date: Jun 2010
Location: My kingdom is not in thi
Old 06-12-2014 , 14:33   Re: [REQ] Simple Respawn
Reply With Quote #3

Quote:
Originally Posted by skatzfz View Post
I tested about 5 plugins
only five ?
Quote:
Sorry for my terrible english ahah
sorry for my long list .
__________________
ANTICHRISTUS is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-12-2014 , 15:35   Re: [REQ] Simple Respawn
Reply With Quote #4

Something I've made some time ago. There are cvars to control:
amx_respawn "1" //- Turns on/off the respawning
amx_respawn_time "0.1" //- The time in float which the player should waite after death before being respawned.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Simple Respawn"
#define VERSION "1.0"
#define AUTHOR "Flicker"

new MainCvar
new CvarTime

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
MainCvar register_cvar("amx_respawn""1")
    
CvarTime register_cvar("amx_respawn_time""0.1")
    
RegisterHam(Ham_Killed"player""Death"1)
}

public 
Death(id)
{
    if(!
is_user_connected(id) || !get_pcvar_num(MainCvar))
        return
        
    
set_task(get_pcvar_float(CvarTime), "Respawn"id)
}

public 
Respawn(id)
{
    if(
is_user_alive(id))
        return
    
    
ExecuteHamB(Ham_CS_RoundRespawnid)

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
skatzfz
Senior Member
Join Date: Apr 2014
Old 06-12-2014 , 15:49   Re: [REQ] Simple Respawn
Reply With Quote #5

Quote:
Originally Posted by Flick3rR View Post
Something I've made some time ago. There are cvars to control:
amx_respawn "1" //- Turns on/off the respawning
amx_respawn_time "0.1" //- The time in float which the player should waite after death before being respawned.
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

#define PLUGIN "Simple Respawn"
#define VERSION "1.0"
#define AUTHOR "Flicker"

new MainCvar
new CvarTime

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
MainCvar register_cvar("amx_respawn""1")
    
CvarTime register_cvar("amx_respawn_time""0.1")
    
RegisterHam(Ham_Killed"player""Death"1)
}

public 
Death(id)
{
    if(!
is_user_connected(id) || !get_pcvar_num(MainCvar))
        return
        
    
set_task(get_pcvar_float(CvarTime), "Respawn"id)
}

public 
Respawn(id)
{
    if(
is_user_alive(id))
        return
    
    
ExecuteHamB(Ham_CS_RoundRespawnid)

It works fine, but when you join the server after the round starts the players don't respawn :s

Quote:
Originally Posted by Baws View Post
Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define VERSION "0.0.1" #define PLUGIN "Death Instant Respawn" public plugin_init() {     register_plugin(PLUGIN, VERSION, "ConnorMcLeod")     RegisterHam(Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", true) } public Ham_CBasePlayer_Killed_Post( id ) {     set_pev(id, pev_deadflag, DEAD_RESPAWNABLE) }
same

Last edited by skatzfz; 06-12-2014 at 15:52.
skatzfz is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 06-12-2014 , 15:58   Re: [REQ] Simple Respawn
Reply With Quote #6

Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Simple Respawn" #define VERSION "1.0" #define AUTHOR "Flicker" new MainCvar new CvarTime public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         MainCvar = register_cvar("amx_respawn", "1")     CvarTime = register_cvar("amx_respawn_time", "0.1")     RegisterHam(Ham_Killed, "player", "Death", 1) } public client_putinserver( id ) {     set_task( 2.0, "Respawn", id ) } public Death(id) {     if(!is_user_connected(id) || !get_pcvar_num(MainCvar))         return             set_task(get_pcvar_float(CvarTime), "Respawn", id) } public Respawn(id) {     if(is_user_alive(id))         return         ExecuteHamB(Ham_CS_RoundRespawn, id) }
__________________
Like my clean plugins and work?
Baws is offline
skatzfz
Senior Member
Join Date: Apr 2014
Old 06-12-2014 , 16:03   Re: [REQ] Simple Respawn
Reply With Quote #7

Quote:
Originally Posted by Baws View Post
Code:
#include <amxmodx> #include <amxmisc> #include <hamsandwich> #define PLUGIN "Simple Respawn" #define VERSION "1.0" #define AUTHOR "Flicker" new MainCvar new CvarTime public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         MainCvar = register_cvar("amx_respawn", "1")     CvarTime = register_cvar("amx_respawn_time", "0.1")     RegisterHam(Ham_Killed, "player", "Death", 1) } public client_putinserver( id ) {     set_task( 2.0, "Respawn", id ) } public Death(id) {     if(!is_user_connected(id) || !get_pcvar_num(MainCvar))         return             set_task(get_pcvar_float(CvarTime), "Respawn", id) } public Respawn(id) {     if(is_user_alive(id))         return         ExecuteHamB(Ham_CS_RoundRespawn, id) }
Problem solved, but now it respawn specs, and when are choosing a team it respawns the players, can you fix that?
skatzfz is offline
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 06-12-2014 , 16:12   Re: [REQ] Simple Respawn
Reply With Quote #8

Well, the plugin respawns players on each their death and when you choose a team, you die, and the plugin respawns you. For not to respawn specs, try this:
EDIT: Was missed to add cstrike include.
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "Simple Respawn"
#define VERSION "1.0"
#define AUTHOR "Flicker"

new MainCvar
new CvarTime

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
MainCvar register_cvar("amx_respawn""1")
    
CvarTime register_cvar("amx_respawn_time""0.1")
    
RegisterHam(Ham_Killed"player""Death"1)
}

public 
client_putinserverid )
{
    
set_task2.0"Respawn"id )
}

public 
Death(id)
{
    if(!
is_user_connected(id) || !get_pcvar_num(MainCvar))
        return
        
    
set_task(get_pcvar_float(CvarTime), "Respawn"id)
}

public 
Respawn(id)
{
    if(
is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return
    
    
ExecuteHamB(Ham_CS_RoundRespawnid)

__________________

Last edited by Flick3rR; 06-12-2014 at 16:32.
Flick3rR is offline
Send a message via Skype™ to Flick3rR
skatzfz
Senior Member
Join Date: Apr 2014
Old 06-12-2014 , 16:21   Re: [REQ] Simple Respawn
Reply With Quote #9

(35) : error 017: undefined symbol "cs_get_user_team"
skatzfz is offline
Baws
Veteran Member
Join Date: Oct 2012
Old 06-12-2014 , 16:26   Re: [REQ] Simple Respawn
Reply With Quote #10

Code:
#include <amxmodx> #include <amxmisc> #include <cstrike> #include <hamsandwich> #define PLUGIN "Simple Respawn" #define VERSION "1.0" #define AUTHOR "Flicker" new MainCvar new CvarTime public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         MainCvar = register_cvar("amx_respawn", "1")     CvarTime = register_cvar("amx_respawn_time", "0.1")     RegisterHam(Ham_Killed, "player", "Death", 1) } public client_putinserver( id ) {     set_task( 2.0, "Respawn", id ) } public Death(id) {     if(!is_user_connected(id) || !get_pcvar_num(MainCvar))         return             set_task(get_pcvar_float(CvarTime), "Respawn", id) } public Respawn(id) {     if(is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)         return         ExecuteHamB(Ham_CS_RoundRespawn, id) }
__________________
Like my clean plugins and work?
Baws 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 13:23.


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