AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved [Problem] cs_player_models_api (https://forums.alliedmods.net/showthread.php?t=317350)

Fuck For Fun 07-08-2019 14:24

[Problem] cs_player_models_api
 
ERROR:
Code:

FATAL ERROR (shutting down): Mod_LoadModel: models/player/Infected_Model/In not
found


Code:

native cs_set_player_model(pPlayer, const szModel[]);
Code:

        new szModel[32];
        formatex(szModel, charsmax(szModel), "models/player/%s/%s.mdl", g_szInfectedModel, g_szInfectedModel);
        precache_model(szModel);

Setting:
Code:

cs_set_player_model(pId, g_szInfectedModel);

thEsp 07-08-2019 14:28

Re: [Problem] cs_player_models_api
 
You don't need to add "models/player/" to model location when using cstrike module/natives, if I remember correctly.
I noticed that you are using an API, but seeing the log it's probably due to a inexistent model.

<VeCo> 07-08-2019 14:30

Re: [Problem] cs_player_models_api
 
Obviously, it gets cut off.
Length of 32 is too short.

Fuck For Fun 07-08-2019 14:36

Re: [Problem] cs_player_models_api
 
Quote:

Originally Posted by <VeCo> (Post 2658347)
Obviously, it gets cut off.
Length of 32 is too short.

Thanks you, worked :)

- My mistake, because it is known to be above the number of characters I have defined.


All times are GMT -4. The time now is 17:31.

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