Raised This Month: $30 Target: $400
 7% 

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 , 09: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

    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 - 80 views - 1.6 KB)

    Last edited by ZMatu; 09-23-2022 at 10:01. Reason: I forgot to put the date sorry
    ZMatu is offline
    Grey83
    Veteran Member
    Join Date: Dec 2014
    Location: Ukraine
    Old 09-23-2022 , 14: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 , 14: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 , 15: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 15:52.
    alasfourom is offline
    LeeNieto
    New Member
    Join Date: Nov 2022
    Old 11-16-2022 , 07: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 06: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 23:19.


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