Raised This Month: $ Target: $400
 0% 

[HELP] New Knifeitup Code Not Working :(


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
priyojit
Member
Join Date: Nov 2013
Location: Kolkata
Old 12-11-2014 , 22:29   [HELP] New Knifeitup Code Not Working :(
Reply With Quote #1

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <dhudmessage>  

#define PLUGIN "knifeitup"
#define VERSION "2.0"
#define AUTHOR "KGC Yash"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("knifeitup_hp""25")
    
register_cvar("knifeitup_adminhp""100")
    
register_cvar("knifeitup_frags""3")
    
register_event("DeathMsg""Event_DeathMsg_knife""a")
}


new 
knifesounds[5][] =
{
    
"sound/knifesound/knife1",
    
"sound/knifesound/knife2",
    
"sound/knifesound/knife3",
    
"sound/knifesound/knife4",
    
"sound/knifesound/knife5"
}

public 
Event_DeathMsg_knife()
{
    new 
Killer read_data(1)
    new 
Victim read_data(2)
    
    if (!
is_user_alive(Killer) || (Killer == Victim))
    return;
    
    new 
CheckWeapon[6];
    
read_data(4CheckWeapon5);
    
    if (
equal(CheckWeapon"knife"))
    {
        new 
php get_cvar_num("knifeitup_hp")
        new 
ahp get_cvar_num("knifeitup_adminhp")
        new 
frags get_cvar_num("knifeitup_frags")
        

        if(
get_user_flags(Killer) & ADMIN_KICK
        {
            
set_dhudmessage(016000.400.6026.012.0)
            
show_dhudmessage(0"%s Got %s Frags %s hp For Knifing Admin %s"KillerfragsahpVictim)
            
client_cmd(0"spk %s"knifesounds)
            
set_user_health(Killerget_user_health(Killer) + ahp)
            
set_user_frags(Killerget_user_frags(Killer) + frags)
        }
       else
        {
        
set_dhudmessage(016000.400.6026.012.0)    
        
show_dhudmessage(0"%s Got %s Frags %s hp For Knifing %s"KillerfragsphpVictim)
        
client_cmd(0"spk %s"knifesounds)
        
set_user_health(Killerget_user_health(Killer) + php)
        
set_user_frags(Killerget_user_frags(Killer) + frags)
       }
    } 

when anyone knifing he got the frags hp and all but when the msg coming it didin't showing players name, frags, hp and killer name. Please Check :'(
__________________
Learning Pawn [20% Completed] | Java [100%] | PHP [100%] | CSS [100%]
priyojit is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 12-11-2014 , 22:42   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #2

Here's a hint:
%s is for strings
%d is for integers
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
priyojit
Member
Join Date: Nov 2013
Location: Kolkata
Old 12-11-2014 , 22:46   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
Here's a hint:
%s is for strings
%d is for integers
bro i am learning please bro explain in details
__________________
Learning Pawn [20% Completed] | Java [100%] | PHP [100%] | CSS [100%]
priyojit is offline
Old 12-12-2014, 00:48
priyojit
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
popeye10
Senior Member
Join Date: May 2014
Location: Navi Mumbai (India)
Old 12-12-2014 , 02:44   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #4

it's better to use chat message.
__________________

Last edited by popeye10; 12-12-2014 at 02:44.
popeye10 is offline
priyojit
Member
Join Date: Nov 2013
Location: Kolkata
Old 12-12-2014 , 04:19   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #5

Quote:
Originally Posted by popeye10 View Post
it's better to use chat message.
i want to use hud message :\
__________________
Learning Pawn [20% Completed] | Java [100%] | PHP [100%] | CSS [100%]
priyojit is offline
Old 12-12-2014, 05:58
priyojit
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-12-2014 , 07:37   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #6

ADmins of this forum this code is copied plzz remove this post

Last edited by tousif; 12-12-2014 at 07:53.
tousif is offline
tousif
AlliedModders Donor
Join Date: Nov 2014
Location: India
Old 12-12-2014 , 07:38   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #7

I have compiled it and some errors wer der so i posted here by Name Many errors this guy is coping all plugins and naming it as it is his
tousif is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-12-2014 , 10:11   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #8

Quote:
Originally Posted by priyojit View Post
bro i am learning please bro explain in details
If you do not understand, then please go back to your studying before you actually start coding
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-12-2014 , 11:28   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #9

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <dhudmessage>  

#define PLUGIN "knifeitup"
#define VERSION "2.0"
#define AUTHOR "KGC Yash"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_cvar("knifeitup_hp""25")
    
register_cvar("knifeitup_adminhp""100")
    
register_cvar("knifeitup_frags""3")
    
register_event("DeathMsg""Event_DeathMsg_knife""a")
}


new 
knifesounds[5][] =
{
    
"sound/knifesound/knife1",
    
"sound/knifesound/knife2",
    
"sound/knifesound/knife3",
    
"sound/knifesound/knife4",
    
"sound/knifesound/knife5"
}

public 
Event_DeathMsg_knife()
{
    new 
Killer read_data(1)
    new 
Victim read_data(2)
    
    if (!
is_user_alive(Killer) || (Killer == Victim))
        return;
    
    new 
szName[32], szName2[32]
    
get_user_name(KillerszNamecharsmax(szName)) 
    
get_user_name(VictimszName2charsmax(szName2)) 
    
    new 
CheckWeapon[6];
    
read_data(4CheckWeapon5);
    
    if (
equal(CheckWeapon"knife"))
    {
        new 
php get_cvar_num("knifeitup_hp")
        new 
ahp get_cvar_num("knifeitup_adminhp")
        new 
frags get_cvar_num("knifeitup_frags")
        
        
        if(
get_user_flags(Killer) & ADMIN_KICK
        {
            
set_dhudmessage(016000.400.6026.012.0)
            
show_dhudmessage(0"%s Got %d Frags %d hp For Knifing Admin %s"szNamefragsahpszName2)
            
client_cmd(0"spk %s"knifesounds)
            
set_user_health(Killerget_user_health(Killer) + ahp)
            
set_user_frags(Killerget_user_frags(Killer) + frags)
        }
       else
        {
        
set_dhudmessage(016000.400.6026.012.0)    
        
show_dhudmessage(0"%s Got %d Frags %d hp For Knifing %s"szNamefragsphpszName2)
        
client_cmd(0"spk %s"knifesounds)
        
set_user_health(Killerget_user_health(Killer) + php)
        
set_user_frags(Killerget_user_frags(Killer) + frags)
       }
    } 

zmd94 is offline
prinoybullboy
Member
Join Date: Aug 2014
Old 12-12-2014 , 12:12   Re: [HELP] New Knifeitup Code Not Working :(
Reply With Quote #10

This is not the original author admins please make a note
prinoybullboy 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 19:23.


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