AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   info_player_start and _deathmatch touch (https://forums.alliedmods.net/showthread.php?t=317894)

ConorCC 08-03-2019 16:35

info_player_start and _deathmatch touch
 
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!

JusTGo 08-03-2019 17:35

Re: info_player_start and _deathmatch touch
 
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
}



All times are GMT -4. The time now is 17:20.

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