Raised This Month: $ Target: $400
 0% 

How to set a sprite to not be a temporary entity?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
z0mbiland
Senior Member
Join Date: Jan 2013
Old 05-11-2015 , 05:16   How to set a sprite to not be a temporary entity?
Reply With Quote #1

Hello,

I want to set a sprite TO NOT BE a TEMPORARY ENTITY!

Like example, zombie blood!

"sprites/blood.spr",
"sprites/blooddrop.spr",
"sprites/bloodspray.spr";

[IMG]http://s7.************/6lppjhvdn/ZM_BLOOD.jpg[/IMG]

How can i do that?

Last edited by z0mbiland; 05-11-2015 at 05:24.
z0mbiland is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-11-2015 , 05:25   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #2

Play with env_sprite entity.
__________________
Arkshine is offline
z0mbiland
Senior Member
Join Date: Jan 2013
Old 05-11-2015 , 05:55   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #3

Quote:
Originally Posted by Arkshine View Post
Play with env_sprite entity.
Can you give an example for "sprites/blood.spr" how to apply the code correctly?
z0mbiland is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 05-11-2015 , 08:22   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #4

This Is actually working right for me.
PHP Code:
entity_set_string(Ent,EV_SZ_classname,g_Classname)
    
entity_set_model(Ent"sprites/blood.spr")
    
entity_set_int(Ent,EV_INT_solid,SOLID_TRIGGER
    
entity_set_size(EntFloat:{-25.0, -25.0, -25.0}, Float:{25.025.025.0}) 
And do not forget the precache .
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
z0mbiland
Senior Member
Join Date: Jan 2013
Old 05-11-2015 , 16:36   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #5

I try something but is not working! The blood.spr is the same temporary entity! I have tested on server!

PHP Code:
#include <amxmodx> 
#include <amxmisc>  
#include <engine>  
#include <fakemeta>  

new g_Classname[] = "Explosion"  
new g_Model[] = "valve/sprites/blood.spr" 

public plugin_init() { 
    
register_plugin("blood""1.1""author"

        
register_clcmd("chakra1","Explosion")  

        
register_touch(g_Classname,"player","TouchExpl")  
     


public 
plugin_precache()  
    
precache_generic(g_Model)  

public 
Explosion(id)  
{  
    new 
Block 
    
new Ent create_entity("info_target")  
    
entity_set_string(Ent,EV_SZ_classname,g_Classname)  
    
entity_set_model(Ent,g_Model
    
entity_set_int(Ent,EV_INT_solid,SOLID_TRIGGER)  
    
entity_set_size(Ent,Float:{-25.0, -25.0, -25.0}, Float:{25.025.0,  

25.0})  
    
entity_set_edict(Ent,EV_ENT_owner,id)   
    
entity_set_intEntEV_INT_movetypeMOVETYPE_FOLLOW );   
    
entity_set_edictEntEV_ENT_aimentid );  
    
entity_set_int(BlockEV_INT_solid2); 
    
entity_set_int(BlockEV_INT_movetype0); 
    new 
Floatorigin[3

    
pev(idpev_originorigin)   
    
origin[2] += 80.0  
    entity_get_vector
(id,EV_VEC_origin,origin)  
    
entity_set_origin(Ent,origin);  

    
origin[2] += 300.0  
    entity_set_origin
(id,origin)  
    
entity_set_float(Ent,EV_FL_animtime,2.0)  
    
entity_set_float(Ent,EV_FL_framerate,1.0)  
    
entity_set_int(Ent,EV_INT_sequence,0);  
     
}  

public 
TouchExpl(Ptd,Ptr)  
{  
    new 
Owner entity_get_edict(Ptd,EV_ENT_owner)  
    if(
Owner != Ptr)  
        return 

z0mbiland is offline
z0mbiland
Senior Member
Join Date: Jan 2013
Old 05-12-2015 , 07:44   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #6

I need a hook for "valve/sprites/blood.spr", "valve/sprites/blooddrop.spr", "valve/sprites/bloodspray.spr" to play with all and make plugin. I don't know the name of the function or stock to make a hook for it! Are 3 .spr showing when you shoot in a zm. Is a valve effect!

Last edited by z0mbiland; 05-12-2015 at 07:47.
z0mbiland is offline
Zaidbt
Senior Member
Join Date: Jun 2014
Location: Morroco
Old 05-12-2015 , 08:12   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #7

Then why you just dont copie them in your Cstrike/models 's File of your server ?..
__________________
http://steamcommunity.com/profiles/76561198044821965
=========Working On Naruto Mod========
Zaidbt is offline
z0mbiland
Senior Member
Join Date: Jan 2013
Old 05-12-2015 , 12:08   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #8

Quote:
Originally Posted by Zaidbt View Post
Then why you just dont copie them in your Cstrike/models 's File of your server ?..
Is not about that this thread!
z0mbiland is offline
Reel mafioso
Member
Join Date: Oct 2014
Location: wouldn't you like to kno
Old 05-12-2015 , 13:02   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #9

Well I don't think you can make it permanent. You could try upping the entity limit with num_edicts. But still, old entities are removed to make room for new ones. You can't make it permanent without editing the map.
Reel mafioso is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-12-2015 , 13:15   Re: How to set a sprite to not be a temporary entity?
Reply With Quote #10

if you make blood sprites remnant , your server will crash very fast with a num_edicts erorr
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever 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 01:32.


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