Raised This Month: $51 Target: $400
 12% 

Help / Support [HELP] No falldamage, screenshake, fade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 05-07-2012 , 12:46   [HELP] No falldamage, screenshake, fade
Reply With Quote #1

Hi ive just made some copy paste code And when compiling it have some error?

PHP Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c1997-2006 ITB CompuPhaseAMX Mod X Team

Warning
Unreachable code on line 34
Warning
Tag mismatch on line 34
Warning
: Function "fw_TakeDamage" should return a value on line 39
Warning
: Function "fw_TakeDamage" should return a value on line 56
Header size
:            564 bytes
Code size
:             1540 bytes
Data size
:              392 bytes
Stack
/heap size:      16384 bytesestimated maxusage=783 cells (3132 bytes)
Total requirements:   18880 bytes

4 Warnings
.
Done
The code
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#include <hamsandwich>
#include <hlsdk_const>

#define PLUGIN "[XopoM] ZM Addon: No fall damage"
#define VERSION "1.0"
#define AUTHOR "=)"

const UNIT_SECOND =         (1<<12)
#define DMG_FALL (1<<5)

new g_msgScreenShake

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
    
    
g_msgScreenShake get_user_msgid("ScreenShake")
}

public 
fw_TakeDamage(victiminflictorattackerFloat:damagedamage_type)
{
    if (!(
damage_type DMG_FALL))
        return 
HAM_IGNORED
    
    
if (!zp_get_user_zombie(victim) || zp_get_user_nemesis(victim))
        return 
HAM_IGNORED
    
    
return HAM_SUPERCEDE
        
    
if(zp_get_user_zombie_class(attacker) == !zp_get_user_zombie(victim))
    {
        if(
zp_get_user_nemesis(attacker))
            return
            
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), _victim)
        
write_short((1<<12)) // duration
        
write_short(0// hold time
        
write_short(0x0000// fade type
        
write_byte(0// red
        
write_byte(180// green
        
write_byte(0// blue
        
write_byte(200// alpha
        
message_end()
        
        
// Screen Shake
        
message_begin(MSG_ONE_UNRELIABLEg_msgScreenShake_victim)
        
write_short(UNIT_SECOND*5// amplitude
        
write_short(UNIT_SECOND*1// duration
        
write_short(UNIT_SECOND*5// frequency
        
message_end()
    }

EDIT: Also can someone add zombies die only headshot? (not nemesis)
__________________

Last edited by naSTR; 05-07-2012 at 12:51.
naSTR is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-07-2012 , 13:17   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #2

You want no falldamage no screenshake no fade? Your c&p code are horrible.
__________________
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
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 05-07-2012 , 14:14   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #3

Quote:
Originally Posted by yokomo View Post
You want no falldamage no screenshake no fade? Your c&p code are horrible.
Sorry i dont know how to script so ive copied it can u fix it?
i need no falldamage and screenshake also screenfade (only for zombies not nemesis)
__________________

Last edited by naSTR; 05-07-2012 at 14:15.
naSTR is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-07-2012 , 14:54   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #4

Done please test.
Attached Files
File Type: sma Get Plugin or Get Source (ZpNoFallDamage.sma - 421 views - 1.7 KB)
__________________
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

Last edited by yokomo; 05-07-2012 at 15:24.
yokomo is offline
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 05-07-2012 , 15:07   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #5

Quote:
Originally Posted by yokomo View Post
Done please test.
sorry u didn't understand me. Zombies have nofalldamage and zombies victim (which means humans) screenfade shake when attacked by zombies.
ty for helping me
__________________
naSTR is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-07-2012 , 15:16   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #6

Quote:
Originally Posted by naSTR View Post
sorry u didn't understand me. Zombies have nofalldamage and zombies victim (which means humans) screenfade shake when attacked by zombies.
ty for helping me
You didn't explain it correctly. I just do like you said in 1st post
__________________
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
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 05-07-2012 , 15:18   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #7

Quote:
Originally Posted by yokomo View Post
You didn't explain it correctly. I just do like you said in 1st post
Sorry my bad
__________________
naSTR is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 05-07-2012 , 15:25   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #8

Quote:
Originally Posted by naSTR View Post
Sorry my bad
Please redownload, also added headshot only for zombies to die. http://forums.alliedmods.net/showpos...21&postcount=4
LOL that's mean you only can aim zombie's head to do some damage on them. This should be Brutal mod.
__________________
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

Last edited by yokomo; 05-07-2012 at 15:26.
yokomo is offline
naSTR
Veteran Member
Join Date: Dec 2011
Location: Asia, Mongolia
Old 05-07-2012 , 15:29   Re: [HELP] No falldamage, screenshake, fade
Reply With Quote #9

Quote:
Originally Posted by yokomo View Post
Please redownload, also added headshot only for zombies to die. http://forums.alliedmods.net/showpos...21&postcount=4
LOL that's mean you only can aim zombie's head to do some damage on them. This should be Brutal mod.
i know but it nice right? if zombies hp low

EDIT: works great. but headshot doesn't work. ive keep shooting at zombie's feet, butt and he's dying. and tried change this zp_get_user_zombie(entity2) but not working either
__________________

Last edited by naSTR; 05-07-2012 at 15:41.
naSTR 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 02:35.


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