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_Pre( victim, inflictor, attacker, Float:damage, dmgbits )
{
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_Pre( iEntity, id )
{
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_TakeDamage, id,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_DGBALL: engfunc(EngFunc_SetModel, ent, g_szDodgeball_World)
case GAME_ZMBOMBS: engfunc(EngFunc_SetModel, ent, g_szZombiebomb_World)
case GAME_SNOWBALL: engfunc(EngFunc_SetModel, ent, g_szSnowball_World)
case GAME_ANGRYBIRDS: engfunc(EngFunc_SetModel, ent, g_szAngryBirds_World)
default: return HAM_IGNORED
}
return FMRES_SUPERCEDE
}
Thanks in advance
__________________