07/01/2022, 12:16 AM
(Última modificación: 07/01/2022, 04:21 PM por Nelo. Edited 2 times in total.)
el auto respawn que usaba junto al plugin auto joinclass
Código:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
public plugin_init()
{
register_plugin("Simple Respawn", "1.0", "Nelo")
register_event("TextMsg", "player_joined", "a", "1=1", "2=#Game_join_terrorist", "2=#Game_join_ct", "2=#Game_join_terrorist_auto", "2=#Game_join_ct_auto")
register_event("DeathMsg", "death_msg", "a")
set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET)
}
public client_disconnect(id)
remove_task(id)
public player_joined()
{
new player[32]
read_data(3, player, 31)
new id = get_user_index(player)
set_task(0.5, "respawn", id)
}
public death_msg()
{
new id = read_data(2)
set_task(0.5, "respawn", id)
}
public respawn(id)
{
if(is_user_connected(id) && !is_user_alive(id) && (cs_get_user_team(id) == CS_TEAM_T || cs_get_user_team(id) == CS_TEAM_CT))
ExecuteHamB(Ham_CS_RoundRespawn, id)
}
Aportes: