Raised This Month: $ Target: $400
 0% 

A few problems..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 07-02-2012 , 17:20   A few problems..
Reply With Quote #1

Hello, sorry if i need help often, but i am new to hamsandwich..

So here's the problem..

As an Counter-Terrorist:
In round start i got godmode, which i shouldn't have..
Here's the Ham_TakeDamage

PHP Code:
public Ham_TakeDamage_PrevictiminflictorattackerFloat:damagedmgbits )
{
    if(
g_iCurrentGame == GAME_HIDE || g_iCurrentGame == GAME_MUSIC) return HAM_IGNORED
    
    
return (cs_get_user_team(victim) == CS_TEAM_CT) ? HAM_SUPERCEDE HAM_IGNORED

And another problem..

As an terrorist:
I got this Ham_Touch_Grenade function,
the problem is when i throw the grenade and it hits the ground, objects, players it's not exploding..
but when i throw it right into the air and it's not touching the ground or any objects, players it's exploding like a HE

PHP Code:
public Ham_Touch_Grenade_PreiEntityid )
{
        if(
g_iCurrentGame != GAME_DGBALL && g_iCurrentGame != GAME_SNOWBALL && g_iCurrentGame != GAME_ANGRYBIRDS && g_iCurrentGame != GAME_ZMBOMBS) return HAM_IGNORED 
       
        
if(is_user_alive(id))
        {
        
set_user_godmode(id)
        
ExecuteHamB(Ham_TakeDamageid,pev(iEntity,pev_owner), 0);
        } 
       
        
remove_entity(iEntity)
       
        return 
HAM_IGNORED

I've tried this about the exploding error, but then the T's gets godmode which they shouldn't:
PHP Code:
public fwdSetModel(ent,const model[])
{    
       if(!
pev_valid(ent) || !equal(model,"models/w_hegrenade.mdl")) return FMRES_IGNORED
       
       set_pev
(ent,pev_dmgtime,get_gametime() + 60.0//<-- THIS ONE I ADDED
       
switch(g_iCurrentGame)
       {
        case 
GAME_DGBALLengfunc(EngFunc_SetModelentg_szDodgeball_World)
        case 
GAME_ZMBOMBSengfunc(EngFunc_SetModelentg_szZombiebomb_World)
        case 
GAME_SNOWBALLengfunc(EngFunc_SetModelentg_szSnowball_World)
        case 
GAME_ANGRYBIRDSengfunc(EngFunc_SetModelentg_szAngryBirds_World)
        default: return 
HAM_IGNORED
       
}
       
       return 
FMRES_SUPERCEDE
       

Thanks in advance
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu

Last edited by MokeN; 07-02-2012 at 17:21.
MokeN is offline
Send a message via Skype™ to MokeN
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-02-2012 , 20:46   Re: A few problems..
Reply With Quote #2

PHP Code:
return (cs_get_user_team(victim) == CS_TEAM_CT) ? HAM_SUPERCEDE HAM_IGNORED 
You're superceding the damage if victim is CT. That's why you've got godmode.

For the second question, show how you register Ham_Touch.
Backstabnoob is offline
StickP0le
Senior Member
Join Date: Jan 2010
Location: cuantocabron.com
Old 07-02-2012 , 22:08   Re: A few problems..
Reply With Quote #3

you need to know that ham_supercede block the damage that's why counter terrorists doesn't receive any damage
__________________
Steam: stickp0le
StickP0le is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 07-03-2012 , 04:44   Re: A few problems..
Reply With Quote #4

Quote:
Originally Posted by Backstabnoob View Post
PHP Code:
return (cs_get_user_team(victim) == CS_TEAM_CT) ? HAM_SUPERCEDE HAM_IGNORED 
You're superceding the damage if victim is CT. That's why you've got godmode.

For the second question, show how you register Ham_Touch.
ah, thanks.

Here's the register:

PHP Code:
RegisterHamHam_Touch"grenade""Ham_Touch_Grenade_Pre"); 
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-03-2012 , 05:27   Re: A few problems..
Reply With Quote #5

You remove the grenade whenever it touches anything.
Backstabnoob is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 07-03-2012 , 06:34   Re: A few problems..
Reply With Quote #6

And how to do that? (a)
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
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 15:01.


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