Raised This Month: $ Target: $400
 0% 

Help With T kills


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-23-2014 , 07:02   Help With T kills
Reply With Quote #1

Fixed

Last edited by Fuck For Fun; 07-06-2014 at 12:54. Reason: Solved
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-23-2014 , 07:04   Re: Help With T kills
Reply With Quote #2

Code:
if(is_user_alive(iVictim) && cs_get_user_team(iVictim) == CS_TEAM_T)

->

Code:
if(!is_user_alive(iVictim) && cs_get_user_team(iVictim) == CS_TEAM_T)

Last edited by aron9forever; 05-23-2014 at 07:04.
aron9forever is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 05-23-2014 , 07:23   Re: Help With T kills
Reply With Quote #3

Try to cache the team.

PHP Code:
new CsTeams:iVictimTeam cs_get_user_team(iVictim
__________________
What are you looking for here?
DavidJr is offline
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-23-2014 , 09:33   Re: Help With T kills
Reply With Quote #4

Quote:
Originally Posted by DavidJr View Post
Try to cache the team.

PHP Code:
new CsTeams:iVictimTeam cs_get_user_team(iVictim
Explain please? where to set it
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-23-2014 , 09:39   Re: Help With T kills
Reply With Quote #5

PHP Code:
public EventDeathMsg( ) 

    new 
CsTeams:iVictimTeam cs_get_user_team(iVictim)  
    new 
CsTeams:iKillerTeam cs_get_user_team(iKiller)  
    new 
iVictim read_data); 
    
    if(
is_user_alive(iVictim) && iVictimTeam == CS_TEAM_T)
    { 
        new 
iKiller read_data); 
         
        if( 
iVictim != iKiller 
        
&&  is_user_connectediKiller )
        &&  
iKillerTeam == CS_TEAM_CT)
        { 
            
// killed by another player 
             
            
new szName32 ], szSteamID35 ]; 
            
get_user_authidiKillerszSteamIDcharsmaxszSteamID ) ); 
             
            new 
szKills48 ], iKills
            if( 
fvault_get_datag_szVaultNameszSteamIDszKillscharsmaxszKills ) ) ) 
            { 
                
strbreakszKillsszKillscharsmaxszKills ), szNamecharsmaxszName ) ); 
                 
                
iKills str_to_numszKills ); 
            } 
            else 
            { 
                
// killed by an enemy 
                 
                
iKills++; 
            } 
             
            
get_user_nameiKillerszName ,charsmaxszName ) ); 
             
            
formatexszKillscharsmaxszKills ), "%i %s"iKillsszName ); 
             
            
fvault_set_datag_szVaultNameszSteamIDszKills ); 
        } 
        else 
        { 
            
// killed self somehow 
        

    } 

__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-23-2014 , 10:05   Re: Help With T kills
Reply With Quote #6

Quote:
Originally Posted by Flick3rR View Post
PHP Code:
public EventDeathMsg( ) 

    new 
CsTeams:iVictimTeam cs_get_user_team(iVictim)  
    new 
CsTeams:iKillerTeam cs_get_user_team(iKiller)  
    new 
iVictim read_data); 
    
    if(
is_user_alive(iVictim) && iVictimTeam == CS_TEAM_T)
    { 
        new 
iKiller read_data); 
         
        if( 
iVictim != iKiller 
        
&&  is_user_connectediKiller )
        &&  
iKillerTeam == CS_TEAM_CT)
        { 
            
// killed by another player 
             
            
new szName32 ], szSteamID35 ]; 
            
get_user_authidiKillerszSteamIDcharsmaxszSteamID ) ); 
             
            new 
szKills48 ], iKills
            if( 
fvault_get_datag_szVaultNameszSteamIDszKillscharsmaxszKills ) ) ) 
            { 
                
strbreakszKillsszKillscharsmaxszKills ), szNamecharsmaxszName ) ); 
                 
                
iKills str_to_numszKills ); 
            } 
            else 
            { 
                
// killed by an enemy 
                 
                
iKills++; 
            } 
             
            
get_user_nameiKillerszName ,charsmaxszName ) ); 
             
            
formatexszKillscharsmaxszKills ), "%i %s"iKillsszName ); 
             
            
fvault_set_datag_szVaultNameszSteamIDszKills ); 
        } 
        else 
        { 
            
// killed self somehow 
        

    } 

Error: Undefined symbol "iKiller"
Error: Undefined symbol "iVictim"

Last edited by Fuck For Fun; 05-23-2014 at 10:05.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-23-2014 , 10:07   Re: Help With T kills
Reply With Quote #7

Оops... Put the iVictimTeam below new iVictim, and iKillerTeam below iKiller. Just added the code to show you, thought you will get that error....
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-23-2014 , 10:11   Re: Help With T kills
Reply With Quote #8

Quote:
Originally Posted by Flick3rR View Post
Оops... Put the iVictimTeam below new iVictim, and iKillerTeam below iKiller. Just added the code to show you, thought you will get that error....
thank
Code:
    new CsTeams:iVictimTeam = cs_get_user_team(iVictimTeam)  
    new CsTeams:iKillerTeam = cs_get_user_team(iKillerTeam)
what it >
Warning: Tag mismatch on line


i have question, Now it will recognize the killings of Prisoners?
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Flick3rR
Veteran Member
Join Date: Feb 2014
Location: Bulgaria, Stara Zagora
Old 05-23-2014 , 10:24   Re: Help With T kills
Reply With Quote #9

Dude, why did you put iVictimTeam and iKillerTeam as an indexes of the functions?! Replace them with iVictim and iKiller...
__________________
Flick3rR is offline
Send a message via Skype™ to Flick3rR
Fuck For Fun
Veteran Member
Join Date: Nov 2013
Old 05-23-2014 , 10:25   Re: Help With T kills
Reply With Quote #10

Quote:
Originally Posted by Flick3rR View Post
Dude, why did you put iVictimTeam and iKillerTeam as an indexes of the functions?! Replace them with iVictim and iKiller...
Like This?
Code:
public EventDeathMsg( ) 
{  
    new iVictim = read_data( 2 ); 
    new CsTeams:iVictimTeam = cs_get_user_team(iVictim)   
    
    if(is_user_alive(iVictim) && iVictimTeam == CS_TEAM_T)
    { 
        new iKiller = read_data( 1 ); 
        new CsTeams:iKillerTeam = cs_get_user_team(iKiller)    
         
        if( iVictim != iKiller 
        &&  is_user_connected( iKiller )
        &&  iKillerTeam == CS_TEAM_CT)
        {

Last edited by Fuck For Fun; 05-23-2014 at 10:30.
Fuck For Fun is offline
Send a message via Skype™ to Fuck For Fun
Reply


Thread Tools
Display Modes

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 09:45.


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