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

Set Player Model 23/09/2022


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ZMatu
New Member
Join Date: Feb 2021
Location: Argentina
Plugin ID:
8191
Plugin Version:
1
Plugin Category:
All
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Place a custom model without having precache errors
    Old 09-23-2022 , 08:56   Set Player Model 23/09/2022
    Reply With Quote #1

    With this plugin you can change the player model in a simple way and without errors like

    player:UTIL_SetModel: not precached

    This can be used in any mode as long as you want to use only one model, for example surf combat
    • Installation instructions
    You simply have to download the script and put the paths of your model files within the same code I put examples on how it should be
    12/09/23
    • SetPlayerModel_v2
    Choose model using cfg was added there is no need to compile the plugin to change models
    Then you can compile it with https://spider.limetech.io/ or with SPCode
    Attached Files
    File Type: sp Get Plugin or Get Source (SetPlayerModel.sp - 187 views - 1.6 KB)
    File Type: sp Get Plugin or Get Source (SetPlayerModel_v2.sp - 55 views - 1.1 KB)
    File Type: smx SetPlayerModel_v2.smx (3.3 KB, 40 views)
    File Type: cfg setmodel_zmatu.cfg (239 Bytes, 27 views)

    Last edited by ZMatu; 09-12-2023 at 16:50. Reason: I forgot to put the date sorry
    ZMatu is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 09-23-2022 , 13:24   Re: Set Player Model 23/09/2022
    Reply With Quote #2

    why not in this way?
    PHP Code:
    #pragma semicolon 1

    #include <sdktools_functions>

    static const char MODEL[] = "models/_*.mdl"// path to used player model

    bool bPrecached;

    public 
    OnMapStart()
    {
        
    bPrecached IsModelPrecached(MODEL) || PrecacheModel(MODELtrue);
    }

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

    public 
    void Event_Spawn(Event event, const char[] namebool dontBroadcast)
    {
        if(!
    bPrecached) return;

        
    int client GetClientOfUserId(event.GetInt("userid"));
        if(
    client && IsPlayerAlive(client)) SetEntityModel(clientMODEL);

    __________________
    Grey83 is offline
    ZMatu
    New Member
    Join Date: Feb 2021
    Location: Argentina
    Old 09-23-2022 , 13:46   Re: Set Player Model 23/09/2022
    Reply With Quote #3

    [QUOTE=Grey83;2789495]why not in this way?
    PHP Code:
    #pragma semicolon 1

    #include <sdktools_functions>

    static const char MODEL[] = "models/_*.mdl"// path to used player model

    bool bPrecached;

    public 
    OnMapStart()
    {
        
    bPrecached IsModelPrecached(MODEL) || PrecacheModel(MODELtrue);
    }

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

    public 
    void Event_Spawn(Event event, const char[] namebool dontBroadcast)
    {
        if(!
    bPrecached) return;

        
    int client GetClientOfUserId(event.GetInt("userid"));
        if(
    client && IsPlayerAlive(client)) SetEntityModel(clientMODEL);

    [/QUOTE

    It just hadn't occurred to me to do it that way, I quite liked your solution, it simplifies it too much
    ZMatu is offline
    alasfourom
    Senior Member
    Join Date: Feb 2022
    Location: Saudi Arabia
    Old 09-23-2022 , 14:50   Re: Set Player Model 23/09/2022
    Reply With Quote #4

    but how is this considered a plugin , maybe I'm wrong anyway, at least execute a cfg file for the model path
    __________________

    Last edited by alasfourom; 09-23-2022 at 14:52.
    alasfourom is offline
    LeeNieto
    New Member
    Join Date: Nov 2022
    Old 11-16-2022 , 06:28   Re: Set Player Model 23/09/2022
    Reply With Quote #5

    How can I get plugins? A proposal is made in an academic essay or article together with supporting data in an effort to convince the reader of the proposition's validity. If you want to understand more about proposal essays, go to https://writinguniverse.com/write-my-essay/. The best option for you is this website because it offers free example proposals.

    Last edited by LeeNieto; 11-23-2022 at 05:38.
    LeeNieto is offline
    Reply


    Thread Tools
    Display Modes

    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 06:26.


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