Raised This Month: $32 Target: $400
 8% 

Auto revive CT !! Fix My Code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MasTer009
Junior Member
Join Date: Jun 2015
Old 08-02-2015 , 12:10   Auto revive CT !! Fix My Code
Reply With Quote #1

Hello i want to make plugin that respawn just ct team and do not respawn terro team

the code sma compiled with done and there is no warning but the ct team doesn't respawn !

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

#define PLUGIN      "Auto Respawn CT"
#define AUTHOR       "EaGle"
#define VERSION        "1.0"

new RespawnTime

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Killed"player""Ham_Killed_player");
    
    
RespawnTime  register_cvar("autors_time""2")
}

public 
Ham_Killed_player(id)
{
    if(!
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_T) {
            
set_hudmessage(00255, -1.00.2836.03.0);        
            
show_hudmessage(id"You will respawn in %i seconds."get_pcvar_num(RespawnTime));
            
set_task(get_pcvar_float(RespawnTime), "respawn"id)
    }
}

public 
client_putinserver(id)
{
    
set_task(get_pcvar_float(RespawnTime), "respawn"id)

Attached Files
File Type: sma Get Plugin or Get Source (autorevive_ct.sma - 439 views - 873 Bytes)
__________________
PHP Code:
public Team (id){
New 
Generation :
#define_link : https://fb.com/newgofficiel 

Last edited by MasTer009; 08-02-2015 at 12:26.
MasTer009 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 08-02-2015 , 12:16   Re: Auto revive CT !! Fix My Code
Reply With Quote #2

Post the full .sma

Edit: That code is garbage :-)
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.

Last edited by wickedd; 08-02-2015 at 12:18.
wickedd is offline
MasTer009
Junior Member
Join Date: Jun 2015
Old 08-02-2015 , 12:26   Re: Auto revive CT !! Fix My Code
Reply With Quote #3

this is the full .sma
__________________
PHP Code:
public Team (id){
New 
Generation :
#define_link : https://fb.com/newgofficiel 
MasTer009 is offline
Perfect Scrash
Senior Member
Join Date: Aug 2013
Location: Brazil
Old 08-02-2015 , 12:48   Re: Auto revive CT !! Fix My Code
Reply With Quote #4

Try:

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

#define PLUGIN      "Auto Respawn CT"
#define AUTHOR       "EaGle | Perfect Scrash"
#define VERSION        "1.0"

new RespawnTime

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	RegisterHam(Ham_Killed, "player", "Ham_Killed_player");
	
	RespawnTime  = register_cvar("autors_time", "5")
}

public Ham_Killed_player(id)
{
	if(cs_get_user_team(id) == CS_TEAM_CT) {
		set_hudmessage(0, 0, 255, -1.0, 0.28, 3, 6.0, 3.0);        
		show_hudmessage(id, "You will respawn in %i seconds.", get_pcvar_num(RespawnTime));
		remove_task(id)
		set_task(get_pcvar_float(RespawnTime), "respawn", id)
	}
}

public client_putinserver(id)
{
	remove_task(id)
	set_task(get_pcvar_float(RespawnTime), "respawn", id)
}

public respawn(id)
{
	if(!is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT) {
		ExecuteHamB(Ham_CS_RoundRespawn, id)
	}
}
__________________
Perfect Scrash is offline
Send a message via Skype™ to Perfect Scrash
MasTer009
Junior Member
Join Date: Jun 2015
Old 08-02-2015 , 13:27   Re: Auto revive CT !! Fix My Code
Reply With Quote #5

Work Thnx Bro
__________________
PHP Code:
public Team (id){
New 
Generation :
#define_link : https://fb.com/newgofficiel 
MasTer009 is offline
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 20:52.


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