AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Double Knife Frag [SEARCH] (https://forums.alliedmods.net/showthread.php?t=262781)

nonocorp 05-12-2015 09:59

Double Knife Frag [SEARCH]
 
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! ;)

indraraj striker 05-12-2015 10:06

Re: Double Knife Frag [SEARCH]
 
1 Attachment(s)
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
    
}



nonocorp 05-12-2015 10:12

Re: Double Knife Frag [SEARCH]
 
Quote:

Originally Posted by indraraj striker (Post 2295885)
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! :D

Bugsy 05-12-2015 13:24

Re: Double Knife Frag [SEARCH]
 
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 );



stekiwnl 05-22-2022 07:18

Re: Double Knife Frag [SEARCH]
 
Quote:

Originally Posted by Bugsy (Post 2295953)
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?

Bugsy 05-22-2022 22:51

Re: Double Knife Frag [SEARCH]
 
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].

stekiwnl 05-23-2022 05:27

Re: Double Knife Frag [SEARCH]
 
Quote:

Originally Posted by Bugsy (Post 2779973)
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 06-25-2022 16:09

Re: Double Knife Frag [SEARCH]
 
Quote:

Originally Posted by Bugsy (Post 2779973)
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

TribalBlood 06-25-2022 17:06

Re: Double Knife Frag [SEARCH]
 
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);
    }



stekiwnl 06-26-2022 12:18

Re: Double Knife Frag [SEARCH]
 
Quote:

Originally Posted by TribalBlood (Post 2782458)
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


All times are GMT -4. The time now is 16:08.

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