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

Get User Skin / Set User Skin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-22-2023 , 02:57   Get User Skin / Set User Skin
Reply With Quote #1

is there any command that can get the user's skin and then set the skin on another user?
__________________
To Infinity n Beyond
Cuttlas is offline
Cuttlas
Senior Member
Join Date: Jan 2015
Old 11-22-2023 , 04:14   Re: Get User Skin / Set User Skin
Reply With Quote #2

here is what I have found:

https://www.amxmodx.org/api/ns/ns_set_player_skin

but what is the skin's id? for example what is the id for gign skin or sas skin?
__________________
To Infinity n Beyond
Cuttlas is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-22-2023 , 11:00   Re: Get User Skin / Set User Skin
Reply With Quote #3

"ns" means Natural Selection. So, if you're not playing Natural Selection then you can't use that function. Regarding the player models, you can look for plugins that already set the player's model like the plugin called "Player Models".
__________________
fysiks is offline
MrPickles
Senior Member
Join Date: Aug 2022
Location: Colombia
Old 11-25-2023 , 16:58   Re: Get User Skin / Set User Skin
Reply With Quote #4

I think there is a confusion of terms, "Skins", basically they are texture variations for a model, it will be the same model but with different colors, and for that you can use "entity_get_int( Client, EV_INT_skin, ), and "entity_set_int( Client, EV_INT_skin, ...", but people call "skins" what are complete model changes, not just the texture, you have to see if you are obtaining or changing the texture of the model or the entire model, if you are changing the model you could use:

PHP Code:
CopyMDLinClientoutClient )
{
        new 
MDL[15], Formatex[65];
        
get_user_infoinClient"model"MDL14 );
        
formatexFormatex64"models/player/%s/%s.mdl"MDLMDL);

        if(
is_user_aliveoutClient ))
        {
                
set_pdata_stringoutClient1420MDL, -120 );
        }
        
entity_set_modeloutClientFormatex );


Last edited by MrPickles; 11-25-2023 at 17:00.
MrPickles 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 11:41.


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