Raised This Month: $ Target: $400
 0% 

small help needed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Vechta
Veteran Member
Join Date: Jun 2010
Old 08-07-2010 , 03:33   Re: small help needed
Reply With Quote #5

maybe?
PHP Code:
public eDeath( )
{
    new 
iKiller read_data(1);
    new 
kill_name[128];
 
    new 
iVictim read_data(2);
    new 
vic_name[128];
 
    new 
iHeadshot read_data(3);
 
    
//Make sure that the killer exists
    
if( <= iKiller <= get_maxplayers() )
    {        
        if(
iHeadshot)
 
        
PlayerXP[iKiller] += get_pcvar_num(XP_Hs);
        
client_print(iKillerprint_chat"%s You got bonus XP for killing %s with Headshot"PREFIXvic_name);
 
        
//Get the victims name
        
get_user_name(iVictimvic_name127);
 
        
//get the killers name
        
get_user_name(iKillerkill_name127);
 
        while(
PlayerXP[iKiller] >= LEVELS[PlayerLevel[iKiller]])
        {
            
client_print(0print_chat"%s You are now on Level %i"PREFIXPlayerLevel[iKiller]);
            
PlayerLevel[iKiller] += 
        
}
        else
        {
            
//If victim is not killer
            
if( iVictim != iKiller )
            {
                
//If victim is not a teammate of killer
                
if( cs_get_user_teamiVictim ) != cs_get_user_teamiKiller ) )
                {
                    
get_user_name(iVictimvic_name127);
 
                    
PlayerXP[iKiller] += get_pcvar_num(XP_Kill)
                    
client_print(iKillerprint_chat"%s You got 20 XP for killing %s"PREFIXvic_name);
                }
            }
        }
    }

Vechta 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 00:07.


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