Raised This Month: $32 Target: $400
 8% 

Double Knife Frag [SEARCH]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nonocorp
Junior Member
Join Date: Jan 2015
Location: Portugal
Old 05-12-2015 , 09:59   Double Knife Frag [SEARCH]
Reply With Quote #1

Hello everyone, I am to see if anyone can help me ... I'm looking for a plugin for CS 1.6 that has as function:
When you kill someone with your knife, you gain 2 frags ...

If anyone can help me I will be grateful, thank you all! ;)
__________________
TeamSpeak 3 || Public & Free Channels


* Sry for my bad english, i am portuguese.
nonocorp is offline
Send a message via Skype™ to nonocorp
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-12-2015 , 10:06   Re: Double Knife Frag [SEARCH]
Reply With Quote #2

here you go :
PHP Code:

#include <amxmodx>
#include <fun>

public plugin_init() {
    
register_event("DeathMsg""knife_death""a");
}

public 
knife_death()
{
    new 
id read_data(1)
    new 
weaponid[10]
    
read_data(4weaponidcharsmax(weaponid))
    
    if(
equal(weaponid"knife"))
    {
        
set_user_frags(id,get_user_frags(id)+2)// you can edit your self now it will add 2 frag
    
}

Attached Files
File Type: sma Get Plugin or Get Source (knife.sma - 766 views - 367 Bytes)
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
nonocorp
Junior Member
Join Date: Jan 2015
Location: Portugal
Old 05-12-2015 , 10:12   Re: Double Knife Frag [SEARCH]
Reply With Quote #3

Quote:
Originally Posted by indraraj striker View Post
here you go :
PHP Code:

#include <amxmodx>
#include <fun>

public plugin_init() {
    
register_event("DeathMsg""knife_death""a");
}

public 
knife_death()
{
    new 
id read_data(1)
    new 
weaponid[10]
    
read_data(4weaponidcharsmax(weaponid))
    
    if(
equal(weaponid"knife"))
    {
        
set_user_frags(id,get_user_frags(id)+2)// you can edit your self now it will add 2 frag
    
}

Thanks man!
__________________
TeamSpeak 3 || Public & Free Channels


* Sry for my bad english, i am portuguese.
nonocorp is offline
Send a message via Skype™ to nonocorp
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-12-2015 , 13:24   Re: Double Knife Frag [SEARCH]
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() 
{
    
register_event"DeathMsg" "knife_death" "a" "4=knife" );
}

public 
knife_death()
{
    
//The 2 is the extra points awarded
    
ExecuteHamHam_AddPoints read_data) , true );

__________________

Last edited by Bugsy; 05-12-2015 at 14:05.
Bugsy is offline
stekiwnl
Junior Member
Join Date: May 2022
Old 05-22-2022 , 07:18   Re: Double Knife Frag [SEARCH]
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() 
{
    
register_event"DeathMsg" "knife_death" "a" "4=knife" );
}

public 
knife_death()
{
    
//The 2 is the extra points awarded
    
ExecuteHamHam_AddPoints read_data) , true );

How to make this plugins work with all weapons and make it for certain admin flag?
stekiwnl is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-22-2022 , 22:51   Re: Double Knife Frag [SEARCH]
Reply With Quote #6

For all weapons, try removing the "4=knife" condition. For flags, check that flags exist in knife_death() before calling ExecuteHam() [you should rename the knife_death() callback function if it applies to everything].
__________________

Last edited by Bugsy; 05-22-2022 at 22:51.
Bugsy is offline
stekiwnl
Junior Member
Join Date: May 2022
Old 05-23-2022 , 05:27   Re: Double Knife Frag [SEARCH]
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
For all weapons, try removing the "4=knife" condition. For flags, check that flags exist in knife_death() before calling ExecuteHam() [you should rename the knife_death() callback function if it applies to everything].
Can you help me create plugin for zombie plague 6.2 for vip players
When VIP kills 1 zombie he gets 10 frags (1kill-10kills on TAB)
And to be on ADMIN_LEVEL_H
stekiwnl is offline
stekiwnl
Junior Member
Join Date: May 2022
Old 06-25-2022 , 16:09   Re: Double Knife Frag [SEARCH]
Reply With Quote #8

Quote:
Originally Posted by Bugsy View Post
For all weapons, try removing the "4=knife" condition. For flags, check that flags exist in knife_death() before calling ExecuteHam() [you should rename the knife_death() callback function if it applies to everything].
Can you help me or create this plugin for me, I will pay
stekiwnl is offline
TribalBlood
Member
Join Date: Oct 2020
Old 06-25-2022 , 17:06   Re: Double Knife Frag [SEARCH]
Reply With Quote #9

try it.

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

public plugin_init()
{
    
register_event"DeathMsg" "Kill" "a" );
}

public 
Kill()
{
    new 
Attacker read_data(1);

    if(!
zp_get_user_zombie(Attacker) && get_user_flags(Attacker) & ADMIN_LEVEL_H)
    {
        
ExecuteHam(Ham_AddPointsAttacker10true);
    }

__________________
My Steam Profile

- Online Rarely -
TribalBlood is offline
stekiwnl
Junior Member
Join Date: May 2022
Old 06-26-2022 , 12:18   Re: Double Knife Frag [SEARCH]
Reply With Quote #10

Quote:
Originally Posted by TribalBlood View Post
try it.

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

public plugin_init()
{
    
register_event"DeathMsg" "Kill" "a" );
}

public 
Kill()
{
    new 
Attacker read_data(1);

    if(!
zp_get_user_zombie(Attacker) && get_user_flags(Attacker) & ADMIN_LEVEL_H)
    {
        
ExecuteHam(Ham_AddPointsAttacker10true);
    }

Works, thank you so much <3
stekiwnl 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 07:12.


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