Raised This Month: $ Target: $400
 0% 

Kill people by touching them (with rankstats-support)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Pinatz
Member
Join Date: Dec 2008
Old 05-14-2009 , 10:44   Kill people by touching them (with rankstats-support)
Reply With Quote #1

Hey guys,
I´m having a problem with the statsx-plugin.
I want to get a touch added as a knife kill in the stats from amx.

So actually statsx uses a query like this to see who killed somebody :
PHP Code:
public client_death(killervictimwpnindexhitplaceTK)
{
    
// Bail out if no killer.
    
if (!killer)
        return 
PLUGIN_CONTINUE

    
if (killer != victim)
    { ....... 
Actually the method I use to let people die by touch is not compatible with it because I use user_silentkill and then create a deathmessage.

PHP Code:
public touch(pToucherpTouched) {
    if(
enable && !wait) {
        if(
pToucher && pToucher 33 && is_user_alive(pToucher) && team[pToucher-1] == 1) {
            if (
pTouched && pTouched 33 && is_user_alive(pTouched) && team[pTouched-1] == 0) {
                
score[pToucher-1][0]++
                
score[pToucher-1][1]++
                
score[pTouched-1][2]++
                
                new 
team get_user_team(pToucher)
                if(
team == 1)
                    
points[0]++
                else
                    
points[1]++
                
//set_user_frags(pToucher,get_user_frags(pToucher)+1)
                //cs_set_user_deaths(pTouched,cs_get_user_deaths(pTouched)+1)
                
                
set_msg_block(deathMsg,BLOCK_ONCE
                
set_msg_block(scoreMsg,BLOCK_ONCE)
                
user_silentkill(pTouched)
                
make_deathmsg(pToucher,pTouched,0,"knife")
                
                
entity_set_float(pToucher,EV_FL_frags,float(score[pToucher-1][0]+(score[pToucher-1][3]*UEBERLEBEN)))    
                
apply_scoreboard(pToucher)
                
apply_scoreboard(pTouched)
                
                
update_teamscore()
                
                if(
other_num() == 1)
                    
speed()
            }
        }
    }

Maybe somebody can tell me how I can fix the issue. I appreciate any help


Edit :
Maybe "client_damage ( attacker, victim, damage, wpnindex, hitplace, TA )" could help me out of this issue, right?
I could just give 100 dmg and then it should work. I'll try this out What´s TA for?
Ah.. its just to query... I cant "give" damage with this :>

The easiest way would be to give 100 dmg from pToucher to pTouched but is there a command to do this?

Last edited by Pinatz; 05-15-2009 at 18:05.
Pinatz is offline
 



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 01:27.


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