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

info_player_start and _deathmatch touch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConorCC
Member
Join Date: Feb 2014
Old 08-03-2019 , 16:35   info_player_start and _deathmatch touch
Reply With Quote #1

info_player_start and info_player_deathmatch entities are NOT touchable. I want to give time SOLID_TRIGGER state to detect when an another entity (like player) touch them.

Yes, I know there are other ways to find them but I want to create something can be triggered on touching them.

Any idea? Thanks!
ConorCC is offline
JusTGo
Veteran Member
Join Date: Mar 2013
Old 08-03-2019 , 17:35   Re: info_player_start and _deathmatch touch
Reply With Quote #2

something like this :

Code:
#include <amxmodx>
#include <fakemeta>


new g_FMSpawn

public plugin_precache()
{
    g_FMSpawn = register_forward(FM_Spawn, "EntSpawn")

}

public plugin_init()
{
    unregister_forward(FM_Spawn, g_FMSpawn)
}

public EntSpawn( ent )
{
    if( !pev_valid(ent) )
    {
        return FMRES_IGNORED
    }

    new class_name[32]
    pev( ent, pev_classname, class_name, charsmax(class_name) )

    if(contain(class_name, "info_player_") != -1)
    {
        set_pev(ent, pev_solid, SOLID_TRIGGER)
    }
    return FMRES_IGNORED
}
__________________

Last edited by JusTGo; 08-03-2019 at 17:38.
JusTGo 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 14:04.


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