Raised This Month: $ Target: $400
 0% 

Reading different precached Models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 03-13-2006 , 09:59   Reading different precached Models
Reply With Quote #1

Hi.

I have an Question ^^ again..

HOW would it be done to make something like this.

command: function [PATHNAME/MODEL.MDL] etc....

So i can choose different Sprites when its precached.

Code:
register_clcmd("Funtion","func",ADMIN_ALL, [value], [Modelpath/modelname]")

Code:
public func(id, the commands, MODELPATH/MODELNAME.MDL) //Creating the Stuff     lopes[id] = create_entity("env_model");     entity_set_string(lopes[id], EV_SZ_classname, "env_model")     entity_set_edict(lopes[id], EV_ENT_owner, id );         entity_set_int(lopes[id], EV_INT_rendermode, rendermo )         entity_set_model(lopes[id], "PATH/MODELNAME.MDL");//Precached Model

Code:
public plugin_precache() { precache_model("pathname/modelname.mdl") precache_model("pathname/modelname1.mdl") precache_model("pathname/modelname2.mdl") etc...     return PLUGIN_HANDLED }

So HOW would that be done, so i can use 1 Code Function with different precached Models ?
Where i have to write the exact pathname and modelname in the console field when i wanna create that Model ?
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen is offline
Stephen
Senior Member
Join Date: Aug 2004
Old 03-13-2006 , 11:25  
Reply With Quote #2

Code:
new model[64]     new filepath[64]     format(model,63,"models/%s.mdl", filepath)     entity_set_model(avatar[id],model)


this is what i use now.
I compiles without erros BUT, when i wanna create the entity an make in console

Function [Modelpath/modelname.mdl]

It crashes an says HOST error: No preache: models/.mdl

How can i fix that ??
__________________
www.corona-bytes.net (ECX = ESF Addon)
Stephen 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 20:16.


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