Raised This Month: $ Target: $400
 0% 

[REQ] T gets 100hp if killed a CT


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-04-2009 , 11:30   [REQ] T gets 100hp if killed a CT
Reply With Quote #1

If the CT is shooting to a T he loses health..
But if the T kills the CT he will become every time 100 hp
KadiR is offline
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 05-04-2009 , 15:01   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #2

Try.
PHP Code:
#include <amxmodx>
#include <fun>
 
new PLUGIN [] = "T gets 100hp if killed a CT"
new VERSION [] = "1.0"
new AUTHOR [] = "M1R0n,M'"
 
new g_Status;
 
public 
plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR );
 
    
register_event("DeathMsg""Kill_Ct""a""1>0");
 
    
g_Status register_cvar("amx_get_hp","1");
 
}
 
public 
Kill_Ct() 
{
     if (!
get_pcvar_num(g_Status))
        return;
 
     new 
killer read_data(1);
     new 
victim read_data(2);
 
     if ((
killer != victim) && get_user_team(victim) == 2)  
     
set_user_health(killer100);
 

__________________
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'; 05-05-2009 at 03:03.
M1R0n,M' is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-04-2009 , 15:24   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #3

will test it

EDIT: doesnt work for me..

Last edited by KadiR; 05-04-2009 at 15:45.
KadiR is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-04-2009 , 15:55   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #4

PHP Code:
 if ((killer == victim) && get_user_team(victim) == 2
--->
PHP Code:
if ((killer != victim) && get_user_team(victim) == 2
xbatista is offline
Send a message via Skype™ to xbatista
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-04-2009 , 18:13   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #5

PHP Code:
#include <fakemeta>
//...
fm_set_user_health(killer100);
//...
stock fm_set_user_health(indexhealth
{
    
health set_pev(indexpev_healthfloat(health)) : dllfunc(DLLFunc_ClientKillindex);

    return 
1;


PHP Code:
#include <fun>
//...
set_user_health(killer100); 
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 05-05-2009 , 03:03   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #6

Code Updated. Try...
__________________
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"){

M1R0n,M' is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-05-2009 , 07:06   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #7

thanks..karma for all..

btw.. can any1 do that for vest+helm too ?
KadiR is offline
Old 05-05-2009, 22:36
--kml--
This message has been deleted by Exolent[jNr]. Reason: You don't even know how to script.
Old 05-06-2009, 07:03
KadiR
This message has been deleted by Exolent[jNr]. Reason: Reply to deleted post.
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-24-2009 , 14:37   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #8

bump
KadiR is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-24-2009 , 14:42   Re: [REQ] T gets 100hp if killed a CT
Reply With Quote #9

PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
 
new PLUGIN [] = "T gets 100hp if killed a CT"
new VERSION [] = "1.0"
new AUTHOR [] = "M1R0n,M'"
 
new g_Status;
 
public 
plugin_init()
{
    
register_pluginPLUGINVERSIONAUTHOR );
 
    
register_event("DeathMsg""Kill_Ct""a""1>0");
 
    
g_Status register_cvar("amx_get_hp","1");
 
}
 
public 
Kill_Ct() 
{
    if (!
get_pcvar_num(g_Status))
        return;
    
    new 
killer read_data(1);
    new 
victim read_data(2);
    
    if ((
killer != victim)
    && 
cs_get_user_team(victim) == CS_TEAM_CT
    
&& cs_get_user_team(killer) == CS_TEAM_T)
    {
        
set_user_health(killer100);
        
cs_set_user_armor(killer100CS_ARMOR_VESTHELM);
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 07:18.


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