View Single Post
Mitchell
~lick~
Join Date: Mar 2010
Old 07-07-2014 , 15:52   Re: Custom Player Skins (Core)
Reply With Quote #9

Quote:
Originally Posted by Root_ View Post
Thanks! This plugin really can be very useful. You dont mind adding precache for custom player model automatically? So plugin developers will not be confused why it crashes. Also add something like this to OnShouldProp hook to prevent players from seeing custom player skin from firstperon of observed target.
Code:
new target = GetEntPropEnt(client, Prop_Send, "m_hObserverTarget"); if (IsValidClient(target) && entity == EntRefToEntIndex(CPS_GetSkin(target))) {     return Plugin_Handled; }
I also got a question about SetVariantString("forward"). I used it for hats plugin, cant see reason of using it here. AFAIK DoD:S have an attachment 'head' instead of generic 'forward' or 'eyes', so I would check engine version just to be clear. And SetEntityRenderMode(client, RENDER_NONE) is for preventing double model on a player or 'misanimations', right?
Thanks in advance.
As for the precache, i will not be adding this, since all this plugin does is set the skin based on the path, and you should precache your models on MapStart() (or OnPluginStart, which ever one...)
I can add the observer target.
The "forward" attachment is so the prop will bonemerge to the model, I don't think i had tested it without though.
The RenderMode is so the prop and the player is not rendered, as i didnt plan for it to be used for glows. I'll add in an argument that you can pass to ignore that feature.
Mitchell is offline