Raised This Month: $ Target: $400
 0% 

[ZP] Whats wrong with this code?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BWC_Chocolate
BANNED
Join Date: Mar 2011
Old 03-21-2011 , 10:34   [ZP] Whats wrong with this code?
Reply With Quote #1

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine_stocks>
#include <zombieplague> 
 
#define PLUGIN "Suck..."
#define VERSION "1.0"
#define AUTHOR "I Love IU :D"
 
new cvar_damage_1 cvar_damage_2
 
public plugin_init() {
 
 
register_plugin(PLUGINVERSIONAUTHOR)
 
 
cvar_damage_1 register_cvar("zp_knife_dmg""500.0")
 
 
cvar_damage_2 register_cvar("zp_knife_dmg_2""5000.0")
 
 
RegisterHam(Ham_TakeDamage"player""forward_takedamage"
}
 
public 
forward_takedamage(victiminflictorattackerFloat:damagedamage_type

 
 if(
attacker == zp_get_user_zombie(attacker)) return HAM_IGNORED;
 
 if(
get_user_weapon(attacker) == CSW_KNIFE
 
 if(
get_user_button(attacker) == IN_ATTACK)
 
SetHamParamFloat(4damage get_pcvar_floatcvar_damage_1 ))
 
 return 
HAM_IGNORED;
 
 if(
get_user_button(attacker) == IN_ATTACK2)
 
SetHamParamFloat(4damage get_pcvar_floatcvar_damage_2 ))
 
 return 
HAM_IGNORED;
    return 
HAM_IGNORED;

I dunno about ham blabla

it doesnt work..

Last edited by BWC_Chocolate; 03-21-2011 at 10:40.
BWC_Chocolate is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 03-21-2011 , 16:14   Re: [ZP] Whats wrong with this code?
Reply With Quote #2

Don't test yet:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine_stocks>
#include <zombieplague> 

#define PLUGIN "Suck..."
#define VERSION "1.0"
#define AUTHOR "I Love IU :D"

new cvar_damage_1 cvar_damage_2

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
cvar_damage_1 register_cvar("zp_knife_dmg""500.0")
    
    
cvar_damage_2 register_cvar("zp_knife_dmg_2""5000.0")
    
    
RegisterHam(Ham_TakeDamage"player""forward_takedamage"
}

public 
forward_takedamage(victiminflictorattackerFloat:damagedamage_type
{
    if(
attacker == zp_get_user_zombie(attacker)) return HAM_IGNORED;
    
    if(
get_user_weapon(attacker) == CSW_KNIFE && (get_user_button(attacker) == IN_ATTACK)) 
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_damage_1 ))
        return 
HAM_IGNORED;
    }
    
    if(
get_user_weapon(attacker) == CSW_KNIFE && (get_user_button(attacker) == IN_ATTACK2))
    {
        
SetHamParamFloat(4damage get_pcvar_floatcvar_damage_2 ))
        return 
HAM_IGNORED;
    }
    
    return 
HAM_IGNORED;

__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo 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 14:38.


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