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

Custom Player Skins (Core)


Post New Thread Reply   
 
Thread Tools Display Modes
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 11-10-2015 , 20:28   Re: Custom Player Skins (Core)
Reply With Quote #61

Quote:
Originally Posted by Blowst View Post
Did u tried something else with that model?

or Try https://forums.alliedmods.net/showpo...3&postcount=48

It's still a stopgap for old-based models tho.
Not sure where to put this code:

PHP Code:
char modelname[128]; 
GetClientModel(clientmodelnamesizeof(modelname)); 
if(
StrContains(modelname"models/player/custom_player/legacy/"false) == 0

    
ReplaceString(modelnamesizeof(modelname), "custom_player/legacy/"""false); 
    if(!
IsModelPrecached(modelname)) 
        
PrecacheModel(modelname); 
    
SetEntityModel(clientmodelname); 


CPS_SetSkin(client, <MODELNAME>, CPS_NOFLAGS); 
Im not a coder, so maybe you can give me the full .sp?

Last edited by Ejziponken; 11-10-2015 at 20:29.
Ejziponken is offline
Blowst
Senior Member
Join Date: Feb 2011
Location: Korea, Republic of
Old 11-11-2015 , 00:43   Re: Custom Player Skins (Core)
Reply With Quote #62

Quote:
Originally Posted by Ejziponken View Post
Im not a coder, so maybe you can give me the full .sp?
Replace this

PHP Code:
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------Event_Spawn        (type: Event)
    When the player spawns, and is alive (for some reason this is fired
    when players first join the game) then apply a skin on the player.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
IsPlayerAlive(client)) {
        
CreateSkin(client);
    }

into following one.
PHP Code:
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------Event_Spawn        (type: Event)
    When the player spawns, and is alive (for some reason this is fired
    when players first join the game) then apply a skin on the player.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
IsPlayerAlive(client)) {
        
RequestFrame(WaitAFrameclient);
    }
}
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------WaitAFrame        (type: RequestFrameCallback)
    Wait a frame after player spawn to retrieve client's actual model.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public void WaitAFrame(int client)
{
    if(
IsPlayerAlive(client)) {
        
char modelname[128]; 
        
GetClientModel(clientmodelnamesizeof(modelname)); // Get clients actual model

        // omg he's using a new-based model!
        
if(StrContains(modelname"models/player/custom_player/legacy/"false) == 0
        {
            
// set back to old-based one!
            
ReplaceString(modelnamesizeof(modelname), "custom_player/legacy/"""false); 
            if(!
IsModelPrecached(modelname)) 
            
PrecacheModel(modelname); // need to precache tho.
            
SetEntityModel(clientmodelname); // set it.
        
}
        
CreateSkin(client); // OK, go for it now!
    
}

__________________
Sorry about my poor English

Blowst is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 11-11-2015 , 11:44   Re: Custom Player Skins (Core)
Reply With Quote #63

Quote:
Originally Posted by Blowst View Post
Replace this

PHP Code:
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------Event_Spawn        (type: Event)
    When the player spawns, and is alive (for some reason this is fired
    when players first join the game) then apply a skin on the player.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
IsPlayerAlive(client)) {
        
CreateSkin(client);
    }

into following one.
PHP Code:
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------Event_Spawn        (type: Event)
    When the player spawns, and is alive (for some reason this is fired
    when players first join the game) then apply a skin on the player.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public Action:Event_Spawn(Handle:event, const String:name[], bool:dontBroadcast) {
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
IsPlayerAlive(client)) {
        
RequestFrame(WaitAFrameclient);
    }
}
/*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
------WaitAFrame        (type: RequestFrameCallback)
    Wait a frame after player spawn to retrieve client's actual model.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/
public void WaitAFrame(int client)
{
    if(
IsPlayerAlive(client)) {
        
char modelname[128]; 
        
GetClientModel(clientmodelnamesizeof(modelname)); // Get clients actual model

        // omg he's using a new-based model!
        
if(StrContains(modelname"models/player/custom_player/legacy/"false) == 0
        {
            
// set back to old-based one!
            
ReplaceString(modelnamesizeof(modelname), "custom_player/legacy/"""false); 
            if(!
IsModelPrecached(modelname)) 
            
PrecacheModel(modelname); // need to precache tho.
            
SetEntityModel(clientmodelname); // set it.
        
}
        
CreateSkin(client); // OK, go for it now!
    
}

Hm okay now weapons seems to be okay. But my other model is now upside down..
Ejziponken is offline
Blowst
Senior Member
Join Date: Feb 2011
Location: Korea, Republic of
Old 11-11-2015 , 20:42   Re: Custom Player Skins (Core)
Reply With Quote #64

Quote:
Originally Posted by Ejziponken View Post
Hm okay now weapons seems to be okay. But my other model is now upside down..
Haha, It's a stopgap solution for old-based models.

it will be needed to add an option that imply if a model is old or new.
__________________
Sorry about my poor English


Last edited by Blowst; 11-11-2015 at 20:46. Reason: gram!!!
Blowst is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 11-18-2015 , 14:38   Re: Custom Player Skins (Core)
Reply With Quote #65

Okay so now I have another problem.

When players die, they revert back to old normal skins. Sometimes it get mixed up so I see a CT normal model with a dress...
Ejziponken is offline
Blowst
Senior Member
Join Date: Feb 2011
Location: Korea, Republic of
Old 11-18-2015 , 21:01   Re: Custom Player Skins (Core)
Reply With Quote #66

Quote:
Originally Posted by Ejziponken View Post
When players die, they revert back to old normal skins.
'cuz the models those players actually see are just dresses.

dress will be gone on player_death, then player's ACTUAL body appear.

it might be fixed by changing player's ragdoll model. (or player's model right before death.)

Quote:
Originally Posted by Ejziponken View Post
Sometimes it get mixed up so I see a CT normal model with a dress...
sometimes... there must be the rule for that.
(Warm-up time or something...)
__________________
Sorry about my poor English


Last edited by Blowst; 11-18-2015 at 21:08.
Blowst is offline
valio_skull
Senior Member
Join Date: Jan 2013
Location: at home
Old 11-24-2015 , 11:04   Re: Custom Player Skins (Core)
Reply With Quote #67

Why am I and my players invisible ?
cfg:
"2" "models\player\techknow\prison\leet_p2.md l"
Actually they are floating knives/weapons
valio_skull is offline
Mason1
New Member
Join Date: Dec 2015
Old 12-11-2015 , 05:18   Re: Custom Player Skins (Core)
Reply With Quote #68

Hello.
I'm having trouble with spectator, and bots showing up as big error boxes.
The two plugins im using is "CustomPlayerSkins" and "csgo admin ESP".
Admin esp is fine its custom player skins that's bugged out for me.

seeking for help
__________________
TheOneAndOlnySolo
Mason1 is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 12-16-2015 , 14:51   Re: Custom Player Skins (Core)
Reply With Quote #69

Quote:
Originally Posted by valio_skull View Post
Why am I and my players invisible ?
cfg:
"2" "models\player\techknow\prison\leet_p2.md l"
Actually they are floating knives/weapons
This plugin doesn't have a config?

Quote:
Originally Posted by Mason1 View Post
Hello.
I'm having trouble with spectator, and bots showing up as big error boxes.
The two plugins im using is "CustomPlayerSkins" and "csgo admin ESP".
Admin esp is fine its custom player skins that's bugged out for me.

seeking for help
I'm not sure why that is happening, this plugin should be fine, i will look into the ESP plugin.

Last edited by Mitchell; 12-16-2015 at 14:54.
Mitchell is offline
Mason1
New Member
Join Date: Dec 2015
Old 12-16-2015 , 19:15   Re: Custom Player Skins (Core)
Reply With Quote #70

Quote:
Originally Posted by Mitchell View Post
This plugin doesn't have a config?



I'm not sure why that is happening, this plugin should be fine, i will look into the ESP plugin.
If you don't see anything I might just be doing something wrong.
__________________
TheOneAndOlnySolo
Mason1 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 14:17.


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