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

SetEntityModel results in ERROR texture


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FuZ!on
Senior Member
Join Date: Aug 2007
Old 10-21-2019 , 21:24   SetEntityModel results in ERROR texture
Reply With Quote #1

Trying to change the model of the grenade when thrown. Works when I have the model within my local files however when I remove the file from my computer and try and download from my CSGO server I'm hosting locally, I get the below.

Spoiler


Here's the parts of my code that pertain to the model.

PHP Code:
public OnMapStart()
{
    
PrecacheModel("models/snowball/snowball.mdl"true);
}

public 
Grenade_SpawnPost(entity)
{
    
SetEntityModel(entity"models/snowball/snowball.mdl");

For what it's worth, I have these settings in my server.cfg also:

Code:
sv_pure 0
cl_forcepreload 1
sv_forcepreload 1

Last edited by FuZ!on; 10-27-2019 at 13:25.
FuZ!on is offline
backwards
AlliedModders Donor
Join Date: Feb 2014
Location: USA
Old 10-22-2019 , 01:27   Re: SetEntityModel results in ERROR texture
Reply With Quote #2

You must add the file and all of the content that make the file in the gam engine to the downloads table on map start and pluginstart.

AddFileToDownloadsTable("models/snowball/snowball.mdl");
AddFileToDownloadsTable("models/snowball/snowball.phy");

including the materials vmt/vtf files.
__________________
I highly recommend joining the SourceMod Discord Server for real time support.
backwards 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 02:08.


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