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

Custom Player Skins (Core)


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 03-28-2015 , 22:32   Re: Custom Player Skins (Core)
Reply With Quote #31

Quote:
Originally Posted by 8guawong View Post
Hi i can't get the following to work

PHP Code:
#include <sdktools>
#include <CustomPlayerSkins>

public OnPluginStart()
{
    
HookEvent("player_spawn"PlayerSpawn);
}

public 
Action:PlayerSpawn(Handle:Event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(Event"userid"));
    if(
IsPlayerAlive(client)) {
        
decl String:model[PLATFORM_MAX_PATH];
        
GetClientModel(clientmodelsizeof(model));
        
PrintToChat(clientmodel);
        
SetEntityRenderMode(clientRENDER_NONE);
        
CPS_SetSkin(clientmodelCPS_NOFLAGS);
    }

player is invisible with above code
What game are you using this on?

Last edited by Mitchell; 03-28-2015 at 22:33.
Mitchell is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 03-28-2015 , 22:34   Re: Custom Player Skins (Core)
Reply With Quote #32

Quote:
Originally Posted by Mitchell View Post
What game are you using this on?
csgo
8guawong is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-28-2015 , 22:37   Re: Custom Player Skins (Core)
Reply With Quote #33

Quote:
Originally Posted by 8guawong View Post
csgo
Few things i can think of:

1. are you trying to view it on your self? if so you will need to make sure the CPS_SetTransmit is set to you. i.e: CPS_SetTransmit(client, client, 2); (after the skin is set)

2. Are you using the latest CPS version (1.3.0)?
Mitchell is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 03-28-2015 , 22:43   Re: Custom Player Skins (Core)
Reply With Quote #34

Quote:
Originally Posted by Mitchell View Post
Few things i can think of:

1. are you trying to view it on your self? if so you will need to make sure the CPS_SetTransmit is set to you. i.e: CPS_SetTransmit(client, client, 2); (after the skin is set)

2. Are you using the latest CPS version (1.3.0)?
yes, i'm using it on myself with 3rd person view.

just tried

PHP Code:
#include <sdktools>
#include <CustomPlayerSkins>

public OnPluginStart()
{
    
HookEvent("player_spawn"PlayerSpawn);
}

public 
Action:PlayerSpawn(Handle:Event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(Event"userid"));
    if(
IsPlayerAlive(client)) {
        
decl String:model[PLATFORM_MAX_PATH];
        
GetClientModel(clientmodelsizeof(model));
        
PrintToChat(clientmodel);
        
//SetEntityRenderMode(client, RENDER_NONE);
        
CPS_RemoveSkin(client);
        
CPS_SetSkin(clientmodelCPS_NOFLAGS);
        
CPS_SetTransmit(clientclient2)
    }

still invisible

19 "Custom Player Skins (Core)" (1.3.0) by Mitchell, Root
8guawong is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-28-2015 , 22:55   Re: Custom Player Skins (Core)
Reply With Quote #35

Sorry for the inconvenience, i had updated it so the CPS_SetTransmit will not automatically block the client's skin if the transmit for the skin allows it.
Please download 1.3.1:
Plugin
Source

Just dont forget to set the transmit back after testing ;)

Last edited by Mitchell; 03-28-2015 at 22:56.
Mitchell is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 03-29-2015 , 01:51   Re: Custom Player Skins (Core)
Reply With Quote #36

thanks working now
8guawong is offline
JoB2C
AlliedModders Donor
Join Date: Jan 2014
Location: France
Old 03-29-2015 , 16:40   Re: Custom Player Skins (Core)
Reply With Quote #37

It would be cool to reflect the Alpha, Color and AddOutput inputs of the players to their corresponding prop.

That would allow the maps to use those inputs on the player as usual, and even make the Alpha one work.
JoB2C is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 03-30-2015 , 03:05   Re: Custom Player Skins (Core)
Reply With Quote #38

Quote:
Originally Posted by Mitchell View Post
Mere warning for those who ask if this will work in tf2, the answer is no, nor am i going to make a version that works for tf2.
Good, because we already have FlaminSarge's Model Manager, and that works just fine, thankyouverymuch.
404UserNotFound is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-30-2015 , 04:04   Re: Custom Player Skins (Core)
Reply With Quote #39

Quote:
Originally Posted by abrandnewday View Post
Good, because we already have FlaminSarge's Model Manager, and that works just fine, thankyouverymuch.
Im not entirely sure why you even posted, as you missed the entire reason this exists. This is not a model manager, it's a developement tool. No where does it say that it's intended to be any type of a model manager. It was initially for FoF where the player models had certain animations that were played, and was used to attach hl2 characters to the FoF player models so operators wouldn't need to rig the models to have those animations.

I also recommend instead of using this as a plugin use the source in their own plugin.
Mitchell is offline
JoB2C
AlliedModders Donor
Join Date: Jan 2014
Location: France
Old 03-30-2015 , 10:43   Re: Custom Player Skins (Core)
Reply With Quote #40

Another little thing: I have some skins without the forward attachment, so I suggest using the primary one instead (it seems to be more common).
JoB2C 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 16:32.


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