AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   T killed (https://forums.alliedmods.net/showthread.php?t=129250)

edgaras85 06-10-2010 16:43

T killed
 
How to know from Kills How much i killed CT or T?

Mandiii 06-10-2010 17:45

Re: T killed
 
Here's the statsx.sma file:
http://pastebin.com/abFpS8Jf

edgaras85 06-10-2010 17:47

Re: T killed
 
Quote:

Originally Posted by Mandiii (Post 1205362)
Here's the statsx.sma file:
http://pastebin.com/abFpS8Jf

I dont need file...
I need edit of that....

edgaras85 06-10-2010 18:28

Re: T killed
 
Made question Easier sorry for bump ( because earlier people saw other request)

Kreation 06-11-2010 01:33

Re: T killed
 
I don't get it. What exactly do you want?

reinert 06-11-2010 02:26

Re: T killed
 
Hook death event, and check if victim is CS_TEAM_T Then add tkills+=1, if CT then add ctkills+=1. Save everything like frags are saved. just edit statsx.sma

GXLZPGX 06-11-2010 02:34

Re: T killed
 
Quote:

Originally Posted by reinert (Post 1205630)
Hook death event, and check if victim is CS_TEAM_T Then add tkills+=1, if CT then add ctkills+=1. Save everything like frags are saved. just edit statsx.sma

I believe this is what you mean:

PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>

#define PLUGIN    "Detect Kills"
#define AUTHOR    "Shadow"
#define VERSION    "1.0"

new tkills[33], ctkills[33];

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHamHam_Killed"player""eDeath")
}

public 
eDeathid )
{
    new 
iAttacker read_data)     
    new 
iVictim read_data)
    
    if( 
iVictim == iAttacker )
        return 
PLUGIN_HANDLED
    
    
if( cs_get_user_teamiVictim ) == CS_TEAM_T )
    {
        
tkills[id]+= 1
    
} else {
        
ctkills[id]+= 1
    
}
    
    return 
PLUGIN_HANDLED;



reinert 06-11-2010 03:37

Re: T killed
 
Yes, but I think he wants to put kill value into /rankstats or /top15 so look at statsx.sma code ;]

edgaras85 06-11-2010 15:10

Re: T killed
 
Quote:

Originally Posted by GXLZPGX (Post 1205635)
I believe this is what you mean:

PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
 
#define PLUGIN    "Detect Kills"
#define AUTHOR    "Shadow"
#define VERSION    "1.0"
 
new tkills[33], ctkills[33];
 
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHamHam_Killed"player""eDeath")
}
 
public 
eDeathid )
{
    new 
iAttacker read_data)     
    new 
iVictim read_data)
 
    if( 
iVictim == iAttacker )
        return 
PLUGIN_HANDLED
 
    
if( cs_get_user_teamiVictim ) == CS_TEAM_T )
    {
        
tkills[id]+= 1
    
} else {
        
ctkills[id]+= 1
    
}
 
    return 
PLUGIN_HANDLED;



Its work if you understand, That From Your rankstats to know how much you killed Terrorist from Kills

GXLZPGX 06-11-2010 15:33

Re: T killed
 
Quote:

Originally Posted by edgaras85 (Post 1206057)
Its work if you understand, That From Your rankstats to know how much you killed Terrorist from Kills

I don't understand what your saying. But if you look at statsx.sma, and take a look at how it saves normal kills, you can make that work for ct kills and t kills to be saved as well.


All times are GMT -4. The time now is 05:26.

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