View Single Post
wy19850
Member
Join Date: Feb 2020
Location: suzhou
Old 04-04-2020 , 13:03   Re: Need respawn plugin that asks if u want to respawn
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
PHP Code:
/* Plugin generated by AMXX-Studio */

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

#define PLUGIN "RespawnMenu"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

new szMenu;
new 
iTeam;

public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1);
    
    
szMenu menu_create("\w[\rBB\w]\y Respawn?""RespawnHandler");
    
    
menu_additem(szMenu"\wYes");
    
menu_additem(szMenu"\wNo");
    
    
menu_setprop(szMenuMPROP_NUMBER_COLOR"\r");
}

public 
PostPlayerKilled(iVictimiAttackeriShouldGib)
{
    
iTeam get_user_team(iVictim);
    
    if(!
is_user_alive(iVictim) && (iTeam == || iTeam == 2))
    {
        
menu_display(iVictimszMenu)
    }
}

public 
RespawnHandler(idszMenuitem)
{
    
iTeam get_user_team(id);
    
    if(!
is_user_alive(id) && (iTeam == || iTeam == 2))
    {
        switch(
item)
        {
            case 
0ExecuteHamB(Ham_CS_RoundRespawnid);
            case 
1: return PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_HANDLED




In CS1.5 test collapse, CS1.6 without option is and is not, come back. Again, optimization, CS1.5 run it. thank you
wy19850 is offline
Send a message via Skype™ to wy19850