Raised This Month: $32 Target: $400
 8% 

reeplace engfunc for temp entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dirty Harry
Junior Member
Join Date: Nov 2022
Old 11-22-2022 , 16:06   reeplace engfunc for temp entity
Reply With Quote #1

Hello, I wanted to know another way to add the sprite to a temp entity, at least I know currently 2, I want to use the 2nd option, but, if I have 2 plugins, and I use the same sprite, I would have to precache the same sprite twice , and I don't want to use engfunc, what other option do I have?

PHP Code:
        message_begin(0SVC_TEMPENTITY);
        
write_byte(TE_SPRITE);
        
write_coord_f(Origin[0]);
        
write_coord_f(Origin[1]);
        
write_coord_f(Origin[2]);
        
write_shortengfuncEngFunc_ModelIndexSPR ) );
        
write_byte(Scale);
        
write_byte(Brillo);
        
message_end(); 
PHP Code:
new SPRITE
SPRITE 
precache_model"sprites/black.spr" );

        
message_begin(0SVC_TEMPENTITY);
        
write_byte(TE_SPRITE);
        
write_coord_f(Origin[0]);
        
write_coord_f(Origin[1]);
        
write_coord_f(Origin[2]);
        
write_short(SPRITE);
        
write_byte(Scale);
        
write_byte(Brillo);
        
message_end(); 
Dirty Harry is offline
Old 11-22-2022, 18:35
MrPickles
This message has been deleted by MrPickles.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-25-2022 , 22:41   Re: reeplace engfunc for temp entity
Reply With Quote #2

The precaching functionality only precaches each file once regardless of how many plugins require it. See this thread for this same question with the answer.
__________________
fysiks 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 01:06.


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