AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] Simple Respawn (https://forums.alliedmods.net/showthread.php?t=242018)

skatzfz 06-12-2014 14:19

[REQ] Simple Respawn
 
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!

Baws 06-12-2014 14:30

Re: [REQ] Simple Respawn
 
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) }

ANTICHRISTUS 06-12-2014 14:33

Re: [REQ] Simple Respawn
 
Quote:

Originally Posted by skatzfz (Post 2150611)
I tested about 5 plugins

only five ?
Quote:

Sorry for my terrible english ahah
sorry for my long list :twisted:.

Flick3rR 06-12-2014 15:35

Re: [REQ] Simple Respawn
 
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)



skatzfz 06-12-2014 15:49

Re: [REQ] Simple Respawn
 
Quote:

Originally Posted by Flick3rR (Post 2150649)
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 (Post 2150616)
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

Baws 06-12-2014 15:58

Re: [REQ] Simple Respawn
 
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) }

skatzfz 06-12-2014 16:03

Re: [REQ] Simple Respawn
 
Quote:

Originally Posted by Baws (Post 2150670)
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?

Flick3rR 06-12-2014 16:12

Re: [REQ] Simple Respawn
 
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)



skatzfz 06-12-2014 16:21

Re: [REQ] Simple Respawn
 
(35) : error 017: undefined symbol "cs_get_user_team"

Baws 06-12-2014 16:26

Re: [REQ] Simple Respawn
 
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) }


All times are GMT -4. The time now is 16:43.

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