Raised This Month: $ Target: $400
 0% 

Need help for AMX Respawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 04-04-2009 , 15:38   Re: Need help for AMX Respawn
Reply With Quote #1

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

#define OFFSET_TEAM 114 
#define fm_get_user_team(%1) ( get_pdata_int ( %1, OFFSET_TEAM ) )

#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "M1R0n,M'"

new g_Status;

public 
plugin_init()  
{      
       
register_plugin(PLUGIN,VERSION,AUTHOR)
            
       
g_Status register_cvar("amx_respawn","1"
     
       
RegisterHam(Ham_Killed"player""Killed_Player"1);
}

public 
Killed_Player(VictimKiller
{
    if(!
get_pcvar_num(g_Status))
        return;

    if(!
is_user_alive(Victim))
    {
        
set_task(10.0,"Respawn",Victim)
    }
}

public 
Respawn(id)
{
    if (
fm_get_user_team(id) == || fm_get_user_team(id) == 3)
                return;

    
ExecuteHamB(Ham_CS_RoundRespawn,id);

No tested.
__________________
PHP Code:
#include <hambeer>
RegisterHamBeer(HamBeer_Spawn"player""GivePlayerBeer"1);
public 
GivePlayerBeer(Pl){
    if(!
is_user_alive(Pl)){
        
ham_give_beer(Pl5)
        
client_print(Plprint_chat"Go Go Go"){


Last edited by M1R0n,M'; 04-04-2009 at 15:40.
M1R0n,M' is offline
ds811888
BANNED
Join Date: Mar 2009
Location: Hong Kong
Old 04-05-2009 , 00:57   Re: Need help for AMX Respawn
Reply With Quote #2

Quote:
Originally Posted by M1R0n,M' View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
 
#define OFFSET_TEAM 114 
#define fm_get_user_team(%1) ( get_pdata_int ( %1, OFFSET_TEAM ) )
 
#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "M1R0n,M'"
 
new g_Status;
 
public 
plugin_init()  
{      
       
register_plugin(PLUGIN,VERSION,AUTHOR)
 
       
g_Status register_cvar("amx_respawn","1"
 
       
RegisterHam(Ham_Killed"player""Killed_Player"1);
}
 
public 
Killed_Player(VictimKiller
{
    if(!
get_pcvar_num(g_Status))
        return;
 
    if(!
is_user_alive(Victim))
    {
        
set_task(10.0,"Respawn",Victim)
    }
}
 
public 
Respawn(id)
{
    if (
fm_get_user_team(id) == || fm_get_user_team(id) == 3)
                return;
 
    
ExecuteHamB(Ham_CS_RoundRespawn,id);

No tested.
Nice! +karma!
ds811888 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 04-05-2009 , 06:45   Re: Need help for AMX Respawn
Reply With Quote #3

Code:
#include <amxmodx>
#include <hamsandwich>
 
#define PLUGIN "Respawn"
#define VERSION "1.0"
#define AUTHOR "M1R0n,M'"
 
new g_Status;
 
public plugin_init()  
{      
register_plugin(PLUGIN,VERSION,AUTHOR)
 
g_Status = register_cvar("amx_respawn","1") 
 
RegisterHam(Ham_Killed, "player", "Killed_Player", 1);
}
 
public Killed_Player(Victim, Killer) 
{
  if(is_user_alive(Victim) && get_pcvar_num(g_Status))
    {
        set_task(10.0,"Respawn",Victim)
      return HAM_HANDLED;
  }
  return HAM_IGNORED;
}
 
public Respawn(id)
{
  static team; team = get_user_team(id);
  if(team == 1 || team == 2)
ExecuteHamB(Ham_CS_RoundRespawn,id);
  return;
}  
SnoW is offline
Send a message via MSN to SnoW
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 02:25.


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