Raised This Month: $51 Target: $400
 12% 

[REQ] tfc ~> admin can contaminate player [solved]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-16-2008 , 06:23   [REQ] tfc ~> admin can contaminate player [solved]
Reply With Quote #1

i find this
PHP Code:
register_logevent("logd_infect",5,"2=Medic_Infection");


 public 
logd_infect()
 {
    
// get the names of the players
    
new logd[64], name1[32], name2[32];

    
read_logargv(0,logd,63);
    
parse_loguser(logd,name1,31);

    
read_logargv(4,logd,63);
    
parse_loguser(logd,name2,31);

    
// get the indexes of the players
    
new player1player2;
    
player1 get_index_by_name(name1);
    
player2 get_index_by_name(name2);

    
// invalid players
    
if(!player1 || !player2) return PLUGIN_CONTINUE;

    
// effects
    
infected[player2] = 1;
    
set_user_rendering(player2,kRenderFxGlowShell,GC_INFECTED_R,GC_INFECTED_G,GC_INFECTED_B,kRenderNormal,16);
    
client_print(0,print_chat,"%s has infected %s, %s will glow %s for the duration of his infection",name1,name2,name2,GC_INFECTED_NAME);

    return 
PLUGIN_CONTINUE;
 } 
(http://forums.alliedmods.net/showthr...light=infected)
and i find this too :
PHP Code:
bool:BotIsInfected(pEntity)
{
        new 
pent = -1;
        while ((
pent find_ent_by_classpent"timer" )) && (is_valid_ent(pent)))
        {
                
//UTIL_SavePent(pent);
                
if((entity_get_edict(pentEV_ENT_owner) == pEntity) && entity_get_edict(pentEV_ENT_enemy))
                {                       
                        if ((
entity_get_int(entity_get_edict(pentEV_ENT_enemy), EV_INT_playerclass) == TFC_CLASS_MEDIC))
                                return 
true;
                } 
        }
        return 
false;

(http://forums.alliedmods.net/showthr...light=infected)
and i find this too : http://forums.alliedmods.net/showthr...light=infected
but how to for admin can conta other player for punish
like amx_conta "player"

maybe build an fake event
or new infection systheme but this infection MUST contaminated other peaple ^^

can you help me please ?

Last edited by kossolax; 03-24-2008 at 12:08.
kossolax is offline
Old 03-17-2008, 17:16
kossolax
This message has been deleted by YamiKaitou. Reason: Don't bump so quick
kossolax
AlliedModders Donor
Join Date: Jan 2008
Location: Belgium
Old 03-23-2008 , 06:15   Re: [REQ] tfc ~> admin can contaminate player
Reply With Quote #2

okey well i need a bit help
see
PHP Code:
register_forward(FM_Touch,"hook_touch"); 
PHP Code:
public hook_touch(ptr,ptd) {
    new 
id ptr
    
new tid ptd
    
new i_classname[32],t_classname[32]
    
pev(id,pev_classname,i_classname,31)
    
pev(tid,pev_classname,t_classname,31)

    if(
equal(i_classname"player")) {
        if(
equal(t_classname"player")) {
            if((
g_InUse[id] == 1)) {
                
CmdPeste(tid)
            }
        }
    }


but don t work when a player touch an other
can you help me please ?
(CmdPeste) work whit amx_virus player and why not with this ?
maybe tid ???

edit :
PHP Code:
public hook_touch(ptr,ptd) {
    
    new 
id ptr
    
if(id && id g_MaxPlayers) {
        new 
tid ptd
        
if(id && id g_MaxPlayers) {
            
CmdPeste(tid)
        }
    }


don t work to need help please

Last edited by kossolax; 03-23-2008 at 13:22.
kossolax 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 03:42.


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