Raised This Month: $ Target: $400
 0% 

if user die


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-07-2011 , 22:14   Re: if user die
Reply With Quote #4

No. What is the variable "suicide"??

EDIT:

PHP Code:
public eDeath()
{
    new 
killer read_data(1);
    new 
victim read_data(2);
    new 
gpoints_kill get_pcvar_num(points_kill);
    new 
gpoints_hs get_pcvar_num(points_hs);
    new 
gpoints_suicide get_pcvar_num(points_suicide);

    if( 
IsPlayer(killer) && is_user_connected(killer) )
    {
        if( 
victim != killer )
        {
            if( 
cs_get_user_team(victim) != cs_get_user_team(killer) )
            {
                if( 
is_user_alive(killer) )
                {
                    if(
read_data(3))
                    {
                        
gCM[killer] += (gpoints_kill gpoints_hs);
                        Print(
killer"You gained %d Points!^x01 (Headshot)", (gpoints_hs gpoints_kill ) );
                    }
                    else
                    {
                        
gCM[killer] += gpoints_kill
                        
Print(killer"You gained %d Points!"gpoints_kill );
                    }
                    
CheckLevel(killer);
                    
SaveData(killer);
                }
            }
        }
        else
        {
            
// killer is equal to victim (player killed self)
            
gCM[killer] += gpoints_suicide
            
Print(killer"You lost %d Points for Suicide!", -gpoints_suicide)
            
CheckLevel(killer);
            
SaveData(killer);
        }
        
    } 
__________________

Last edited by fysiks; 05-07-2011 at 22:22.
fysiks 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 04:19.


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