Raised This Month: $ Target: $400
 0% 

Is this the right way?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
bLacK-bLooD
AlliedModders Donor
Join Date: Jun 2008
Old 06-26-2012 , 06:27   Is this the right way?
Reply With Quote #1

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

public plugin_init(){
   
register_plugin("RESPAWN""1.0""Kinnekt")
   
register_event("DeathMsg""hook_death""a")
   
register_clcmd("say /respawn""res")
}

public 
hook_death(){
   new 
victim read_data(2)
   
   if(
get_user_team(victim) == 2)
      
set_task(0.5"res"victim)
}

public 
client_putinserver(id)
{
   if( !
is_user_alive(id) || !(CS_TEAM_T <= cs_get_user_team(id) <= CS_TEAM_CT) )
      
set_task(0.5"res"id)
   
   return 
PLUGIN_CONTINUE
}

public 
res(id){
   if(!
is_user_connected(id))
      return 
PLUGIN_HANDLED
   
   ExecuteHamB
(Ham_CS_RoundRespawnid)
   
   return 
PLUGIN_CONTINUE

__________________
We all live under the same sky but we have different horizons.

Last edited by bLacK-bLooD; 06-26-2012 at 07:37.
bLacK-bLooD is offline
 


Thread Tools
Display Modes

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 06:17.


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