Raised This Month: $18 Target: $400
 4% 

Semiclip for grenades


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mlibre
Member
Join Date: Nov 2015
Location: Northern South America
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
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-01-2020 , 08:48   Re: Semiclip for grenades
Reply With Quote #2

This is to stop midair grenade collisions? By default 'nades ricochet and you want semi-clip?
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell
DJEarthQuake is offline
mlibre
Member
Join Date: Nov 2015
Location: Northern South America
Old 08-01-2020 , 16:53   Re: Semiclip for grenades
Reply With Quote #3

the objective is that they do not collide with the same team, at the moment it does it for everyone without assigning teams what is not wanted
__________________
mlibre is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 08-01-2020 , 17:38   Re: Semiclip for grenades
Reply With Quote #4

Use resemiclip module (for rehlds)
__________________
Shadows Adi is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-01-2020 , 20:57   Re: Semiclip for grenades
Reply With Quote #5

Quote:
Originally Posted by mlibre View Post
the objective is that they do not collide with the same team, at the moment it does it for everyone without assigning teams what is not wanted
Team splitting code snip.
https://forums.alliedmods.net/showpo...6&postcount=24

Some API.
https://www.amxmodx.org/api/engine/get_grenade_id
__________________
"It's not the actual programming that's interesting. But it's what you can accomplish with the end results that are important." -Dennis Ritchie
"Mathematics, rightly viewed, possesses not only truth, but supreme beauty a beauty cold and austere, like that of sculpture..." -Bertrand Russell

Last edited by DJEarthQuake; 08-01-2020 at 21:05.
DJEarthQuake is offline
mlibre
Member
Join Date: Nov 2015
Location: Northern South America
Old 08-02-2020 , 17:14   Re: Semiclip for grenades
Reply With Quote #6

Quote:
Originally Posted by Shadows Adi View Post
Use resemiclip module (for rehlds)
indeed it is an alternative solution, it works as such, I would like to make it work individually, it will only affect the grenades
__________________
mlibre is offline
mlibre
Member
Join Date: Nov 2015
Location: Northern South America
Old 08-02-2020 , 17:20   Re: Semiclip for grenades
Reply With Quote #7

Quote:
Originally Posted by DJEarthQuake View Post
it would have to do as a kind of scan of all the players to know who is from the opposing team so that you can identify during the journey where to bounce and where not, so the entity can pass it without interruption
__________________
mlibre is offline
Reply


Thread Tools
Display Modes

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 10:48.


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