Raised This Month: $ Target: $400
 0% 

Help remove some functions


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
PandaDnB
Senior Member
Join Date: Jan 2012
Old 10-08-2012 , 14:06   Help remove some functions
Reply With Quote #1

Can someone make it to give you points only when you kill with knife i don't need the other things.
PHP Code:
public Event_DeathMsg() {
    new 
iKiller     read_data(1)
    new 
iVictim     read_data(2)
    new 
iHS     read_data(3)
    new 
wep[32]
    
read_data(4wepsizeof wep-1)
    if((
iKiller <= 33) && iKiller != iVictim) {
        new 
CheckFrags get_user_frags(iVictim)
        new 
CheckDeaths get_user_deaths(iVictim)
        if(
pCvarPtzWeakPlayer) {
            if(
CheckDeaths CheckFrags) {
                
set_hudmessage(255000.850.016.02.0)
                
show_hudmessage(iKiller"+0 PTz (The killed player is too weak)")
            }
        }
        else {
            if(
iHS) {
                
iPtz[iKiller] += get_pcvar_num(pCvarPtzHS)
                
set_hudmessage(17025500.850.016.02.0)
                
show_hudmessage(iKiller"+%i PTz"get_pcvar_num(pCvarPtzHS))
            }
            else {
                
iPtz[iKiller] += get_pcvar_num(pCvarPtzNormal)
                
set_hudmessage(25517000.850.016.02.0)
                
show_hudmessage(iKiller"+%i PTz"get_pcvar_num(pCvarPtzNormal))
            }
            if(
equali(wep"knife"))
            {
                
iPtz[iKiller] += get_pcvar_num(pCvarPtzKnife)
                new 
nick[32], iPlayers32 ], iNum
                get_user_name
(iKillernickcharsmax(nick))
                
get_players(iPlayersiNum)
                for(new 
i=0;i<iNum;i++)
                {
                    
set_hudmessage(00255, -1.00.1616.02.0)
                    
show_hudmessage(iPlayers[i], "%s received +%i PTz for knife kill!"nickget_pcvar_num(pCvarPtzKnife))
                }
            }
        }
    }

PandaDnB is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 10-08-2012 , 14:10   Re: Help remove some functions
Reply With Quote #2

delete
PHP Code:
            if(iHS) { 
                
iPtz[iKiller] += get_pcvar_num(pCvarPtzHS
                
set_hudmessage(17025500.850.016.02.0
                
show_hudmessage(iKiller"+%i PTz"get_pcvar_num(pCvarPtzHS)) 
            } 
            else { 
                
iPtz[iKiller] += get_pcvar_num(pCvarPtzNormal
                
set_hudmessage(25517000.850.016.02.0
                
show_hudmessage(iKiller"+%i PTz"get_pcvar_num(pCvarPtzNormal)) 
            } 
__________________

Last edited by Artifact; 10-08-2012 at 14:10.
Artifact is offline
PandaDnB
Senior Member
Join Date: Jan 2012
Old 10-08-2012 , 14:16   Re: Help remove some functions
Reply With Quote #3

what about theese ?
PHP Code:
 public Event_DeathMsg() { 
    new 
iKiller     read_data(1
    new 
iVictim     read_data(2
    new 
iHS     read_data(3
    new 
wep[32
    
read_data(4wepsizeof wep-1
    if((
iKiller <= 33) && iKiller != iVictim) { 
        new 
CheckFrags get_user_frags(iVictim
        new 
CheckDeaths get_user_deaths(iVictim
        if(
pCvarPtzWeakPlayer) { 
            if(
CheckDeaths CheckFrags) { 
                
set_hudmessage(255000.850.016.02.0
                
show_hudmessage(iKiller"+0 PTz (The killed player is too weak)"
            } 
        } 
        else { 
PandaDnB is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 10-08-2012 , 15:20   Re: Help remove some functions
Reply With Quote #4

This is for weak players, how have less kills then deaths, but if you want for only knife take this:
PHP Code:
public Event_DeathMsg() {
    new 
iKiller     read_data(1)
    new 
iVictim     read_data(2)
    new 
wep[32]
    
read_data(4wepsizeof wep-1)
    if(
equali(wep"knife"))
    {
        
iPtz[iKiller] += get_pcvar_num(pCvarPtzKnife)
        new 
nick[32], iPlayers32 ], iNum
        get_user_name
(iKillernickcharsmax(nick))
        
get_players(iPlayersiNum)
        for(new 
i=0;i<iNum;i++)
        {
            
set_hudmessage(00255, -1.00.1616.02.0)
            
show_hudmessage(iPlayers[i], "%s received +%i PTz for knife kill!"nickget_pcvar_num(pCvarPtzKnife))
        }
    }

__________________
Artifact is offline
Reply



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 05:47.


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