Raised This Month: $ Target: $400
 0% 

[help] Will this DMG multiplier will work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 07-26-2010 , 07:22   [help] Will this DMG multiplier will work?
Reply With Quote #1

Hey Guys Im not sure if this will work so i need help.

PHP Code:
public ham_zombie_knife(id)
{
if(
cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id) ) 
    {
        if (
PlayerLevel[id] == 1)
        {
            
SetHamParamFloat(41.0)
        }
        if (
PlayerLevel[id] == 2)
        {
            
SetHamParamFloat(41.1)
        }
        if (
PlayerLevel[id] == 3)
        {
            
SetHamParamFloat(41.2)
        }
        if (
PlayerLevel[id] == 4)
        {
            
SetHamParamFloat(41.3)
        }
    }

__________________
jc980 is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-26-2010 , 07:33   Re: [help] Will this DMG multiplier will work?
Reply With Quote #2

Test and see yourself ?
__________________
Arkshine is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 07-26-2010 , 07:39   Re: [help] Will this DMG multiplier will work?
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Test and see yourself ?
yes. but i didnt know if i was getting moar damage or not.
__________________
jc980 is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-26-2010 , 07:40   Re: [help] Will this DMG multiplier will work?
Reply With Quote #4

better to use switch(PlayerLevel[id])
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 07-26-2010 , 09:48   Re: [help] Will this DMG multiplier will work?
Reply With Quote #5

Try this (untested :S)

PHP Code:
new Float:g_level_dmg[] = {
    
1.0// Level 0 -.-
    
1.1// Level 1
    
1.2// Level 2
    
1.3// Level 3
    
1.4// Level 4
    
1.5  // Level 5
}

public 
ham_zombie_knife(id)
{
      if(
cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id) ) 
      {
              
SetHamParamFloat(4damage g_level_dmg[PlayerLevel[id]])
      }

__________________

Last edited by alan_el_more; 07-26-2010 at 19:39.
alan_el_more is offline
G[o]Q
Member
Join Date: Jan 2010
Location: Poland (Malopolska)
Old 07-26-2010 , 18:50   Re: [help] Will this DMG multiplier will work?
Reply With Quote #6

do you use Ham_TakeDamage ?
Code:


public ham_zombie_knife(id, idinflictor, idattacker,Float:damage,damagebits)
{
if(cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id) ) 
    {
switch(PlayerLevel[id]){
       case 1:{
              SetHamParamFloat(4, 1.0*damage)
       }
       case 2:{
              SetHamParamFloat(4, 1.1*damage)
       }
       case 3:{
              SetHamParamFloat(4, 1.2*damage)
       }
       case 4:{
              SetHamParamFloat(4, 1.3*damage)
       }
}
    }
}  


Code:
damage = damage*1.1

not
Code:
damage = 1.1
G[o]Q is offline
jc980
Veteran Member
Join Date: Jan 2010
Location: God is with us...
Old 07-27-2010 , 05:13   Re: [help] Will this DMG multiplier will work?
Reply With Quote #7

Quote:
Originally Posted by g[o]q View Post
do you use Ham_TakeDamage ?
Code:


public ham_zombie_knife(id, idinflictor, idattacker,Float:damage,damagebits)
{
if(cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id) ) 
    {
switch(PlayerLevel[id]){
       case 1:{
              SetHamParamFloat(4, 1.0*damage)
       }
       case 2:{
              SetHamParamFloat(4, 1.1*damage)
       }
       case 3:{
              SetHamParamFloat(4, 1.2*damage)
       }
       case 4:{
              SetHamParamFloat(4, 1.3*damage)
       }
}
    }
}  


Code:
damage = damage*1.1

not
Code:
damage = 1.1
yes. i just renamed it
__________________
jc980 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-27-2010 , 05:55   Re: [help] Will this DMG multiplier will work?
Reply With Quote #8

PHP Code:
PlayerLevel[id] * 0.1 1.0 ) * damage 
SnoW is offline
Send a message via MSN to SnoW
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 00:13.


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