alliedmodders / amxmodx

AMX Mod X - Half-Life 1 Scripting and Administration
http://www.amxmodx.org/
497 stars 201 forks source link

set_user_rendering #613

Open uGamers opened 6 years ago

uGamers commented 6 years ago

set_user_rendering will not work ive tried alot of different ways. Engine, Fakemeta, Fun

Code im using right now.

#include <amxmodx>
#include <fakemeta>
#include <fun>

#define PLUGIN   "Stealth"
#define VERSION  "1.0"
#define AUTHOR   "Mark"

#define STEALTH  16.0

new g_szName[32]

new const sound_stealth[] =
{
    "zombie_escape/blinkarrival.wav"
}

public plugin_init()
{
      register_plugin(PLUGIN,VERSION,AUTHOR)

      register_clcmd("give_stealth", "give_stealth")
}

public plugin_precache()
{
      precache_sound(sound_stealth)
}

public give_stealth(id)
{
        set_user_rendering(id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 0)
        set_user_footsteps(id, 1)

        get_user_name(id, g_szName, 31)
        set_task( STEALTH , "remove_stealth", id)
}

public remove_stealth(id)
{
    get_user_name(id, g_szName, 31)
    set_user_rendering(id)
    set_user_footsteps(id, 0)
}
OciXCrom commented 6 years ago

I don't see anything wrong nor I can reproduce the problem. Disable all custom plugins and test again.

uGamers commented 6 years ago

I did have everything off does rehlds and reapi affect this?>

Arkshine commented 6 years ago

You need to define an amount I believe. You might need kRenderFxGlowShell too. The native uses directly the engine fields. If something doesn't work here, it means you don't use the proper value.

crywolfy commented 6 years ago

hi guys same here, latest AMXX with CSDM updated, and reHLDS and ReGameDLL, spawn protection active but no spawn color

gtteamamxx commented 6 years ago

@uGamers change from kRenderTransAlpha to kRenderTransAdd or, if you want to do this on entity:

@hideEntity(entity) { fm_set_rendering(entity, .r = 0, .g = 0, .b = 0, .render = kRenderTransAdd, .amount = 0) }

ps. fm_set_rendering works for players/entities (i just checked now)

hellmoss commented 5 years ago

Problem still there, tried with literally one plugin running, tried all combinations and values.

Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.4.0.668-dev Build date: 09:47:42 Sep 29 2018 (1631)

gtteamamxx commented 5 years ago

Problem still there, tried with literally one plugin running, tried all combinations and values.

Protocol version 48 Exe version 1.1.2.7/Stdio (cstrike) ReHLDS version: 3.4.0.668-dev Build date: 09:47:42 Sep 29 2018 (1631)

For me code above is working. I cannot help you :(