AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   attached model additive not visible (https://forums.alliedmods.net/showthread.php?t=86988)

Hunter-Digital 03-05-2009 09:03

attached model additive not visible
 
I have a problem, I attached a model to a player and the model is visible to other players only if pev_render is 0, any other value than that is invisible only to OTHER players, I can see it on thirdperson view... how can I fix this ?

Hunter-Digital 03-06-2009 04:55

Re: attached model
 
*BUMP*

noone knows ? I just need an attached additive model to a player, I have the code, it works... but it's not visible to other players, only to me, but if I remove the pev_rendermode (or set it to 0, normal) it it's visible to other players

BOYSplayCS 03-06-2009 06:59

Re: attached model
 
Let me see the code.

Also, please wait two weeks before you bump your posts.

Hunter-Digital 03-06-2009 08:38

Re: attached model
 
Oh, sry about the bump :P

the code... it's pretty obvious :) I just explained what I have...

ok let me explain in code;

this is when I can only see my model (with third person view) but noone else can:
Code:

ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
engfunc(EngFunc_SetModel, ent, MODEL)
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW)
set_pev(ent, pev_aiment, id)
set_pev(ent, pev_solid, 1)
set_pev(ent, pev_owner, id)
set_pev(ent, pev_rendermode, 5) // additive
set_pev(ent, pev_renderamt, 100.0)

but if I remove the set_pev(ent, pev_rendermode, 5) or set it to 0 will be visible to other players.

all I need is to set an attached additive model to an player that is not affected by world lightning and also seen by other players.

Hunter-Digital 03-17-2009 09:45

Re: attached model additive not visible
 
well, this thread has gone to page 7 by now... doesn't anyone know why an attached rendermode 5(additive) model isn't viewable to any other players but the player attached to ? :(

MeRcyLeZZ 03-19-2009 16:46

Re: attached model additive not visible
 
Well I tried your code using a hostage model, and I don't have the problem you describe (additive models look pretty cool, btw). I tested with bots if that matters...

You sure you don't have any other plugins/code changing something?

Hunter-Digital 03-19-2009 19:00

Re: attached model additive not visible
 
well... no, all plugins are removed from the plugins.ini ... and I stripped my other codes and made a plain plugin with this and STILL doesn't work :|

Code:

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
 
new ent[33]
new MODEL[] = "models/qtruck.mdl"
 
public plugin_init()
{
    register_clcmd("test", "dotest")
}
 
public plugin_precache()
{
    precache_model(MODEL)
}
 
public dotest(id)
{
    if(!is_user_alive(id))
        return PLUGIN_HANDLED
 
    if(pev_valid(ent[id]))
        fm_remove_entity(ent[id])
 
    ent[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"))
    engfunc(EngFunc_SetModel, ent[id], MODEL)
    set_pev(ent[id], pev_movetype, MOVETYPE_FOLLOW)
    set_pev(ent[id], pev_aiment, id)
    set_pev(ent[id], pev_rendermode, kRenderTransAdd)
    set_pev(ent[id], pev_renderamt, 100.0)
 
    return PLUGIN_HANDLED
}

The model is showing only if rendermode is 0 or not set :( I tried spawning it, setting amt to 255, setting other than 5, still doesn't appear :(

MeRcyLeZZ 03-21-2009 17:40

Re: attached model additive not visible
 
Have you tried using another model?

Hunter-Digital 03-22-2009 18:34

Re: attached model additive not visible
 
It can't be :) because I can see it but other players can't (tested with another computer that's next to me, so nothing as a false report there :) ) so if rendermode 5 would make the model entierily invizible... I couldn't see it either :) but I can :P


All times are GMT -4. The time now is 16:54.

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