View Single Post
Author Message
mlibre
Veteran Member
Join Date: Nov 2015
Location: return PLUGIN_CONTINUE
Old 07-31-2020 , 19:21   Semiclip for grenades
Reply With Quote #1

Hello, I am trying to make the grenades not collide with the same equipment, I have tried various plugins and they don't work ... I tried to do it on my own and got this result. Is it really reliable to do it this way?

PHP Code:
public fw_SetModel(entitymodel[])
{
    if( !
pev_valid(entity) )
        return 
FMRES_IGNORED
    
    
static idid pev(entitypev_owner)
    
    if(
is_user_connected(id))
        return 
FMRES_IGNORED
        
    
if(contain(model"grenade") != -|| contain(model"flashbang") != -1)
        
set_pev(entitypev_solidSOLID_TRIGGER)
    
    return 
FMRES_IGNORED

Now how do I differentiate teams? I want to do something like that, an idea

PHP Code:
if(get_user_team(id) != get_user_team(enemy))
        
set_pev(entitypev_solidSOLID_TRIGGER
mlibre is offline