Raised This Month: $ Target: $400
 0% 

create a flame for few seconds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
faki
Senior Member
Join Date: Jul 2013
Old 05-21-2014 , 09:02   create a flame for few seconds
Reply With Quote #1

I want to create a flame with spr for 10 seconds, after this seconds is pass - flame is need to be hiding by script.

Thanks for any answers.
I try with some functions from molotov coctail but without success.
I want simple and easy to use stock or code.
faki is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 05-21-2014 , 09:18   Re: create a flame for few seconds
Reply With Quote #2

You need to make an entity then attach the sprites, then set_task for 10 minutes to remove.

PHP Code:
new const EntityName[] = "flame";
new const 
Sprites[] = "sprites/flame.spr";

CreateFlame()
{
    new 
iEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString));
    
    
set_pev(iEntpev_classnameEntityName);
    
engfunc(EngFunc_SetModeliEntSprites);
    
    
set_task(10.0"task_RemoveFlame"iEnt);
}

public 
task_RemoveFlame(iEnt)
{
    if (!
pev_valid(iEnt)) return;
    
    
engfunc(EngFunc_RemoveEntityiEnt);

__________________
What are you looking for here?
DavidJr is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-21-2014 , 09:38   Re: create a flame for few seconds
Reply With Quote #3

What about origin
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
faki
Senior Member
Join Date: Jul 2013
Old 05-21-2014 , 09:43   Re: create a flame for few seconds
Reply With Quote #4

@DavidJr, This crashed the server, any other suggestions ?

PP i want to put in
create_blast2(const FloatriginF[3])

Last edited by faki; 05-21-2014 at 09:44.
faki is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 05-21-2014 , 09:49   Re: create a flame for few seconds
Reply With Quote #5

Try with TE_BEAMFOLLOW:

PHP Code:
new const EntityName[] = "flame";
new const 
Mdl[] = "models/bullet.mdl";

new 
Sprite;

public 
plugin_precache()
{
    
Sprite precache_model("sprites/flame.spr");
}

CreateFlame()
{
    new 
iEnt engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString));
    
    
set_pev(iEntpev_classnameEntityName);
    
engfunc(EngFunc_SetModeliEntMdl);
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(TE_BEAMFOLLOW);
    
write_short(iEnt);
    
write_short(Sprite);
    
write_byte(10);
    
write_byte(5);
    
write_byte(255);
    
write_byte(255);
    
write_byte(255);
    
write_byte(200);
    
message_end();

__________________
What are you looking for here?
DavidJr is offline
faki
Senior Member
Join Date: Jul 2013
Old 05-21-2014 , 09:54   Re: create a flame for few seconds
Reply With Quote #6

Same, still crash the server
Code:
FATAL ERROR (shutting down): Host_Error: no precache: ******************@x************************************8t******************8x*********$******************
faki is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 05-21-2014 , 10:07   Re: create a flame for few seconds
Reply With Quote #7

add precache_model(Mdl); in plugin_precache
__________________
What are you looking for here?
DavidJr is offline
faki
Senior Member
Join Date: Jul 2013
Old 05-21-2014 , 11:04   Re: create a flame for few seconds
Reply With Quote #8

Server is crashed again.
faki is offline
DavidJr
Senior Member
Join Date: Apr 2012
Old 05-21-2014 , 11:35   Re: create a flame for few seconds
Reply With Quote #9

What's the message?
__________________
What are you looking for here?
DavidJr is offline
faki
Senior Member
Join Date: Jul 2013
Old 05-21-2014 , 11:38   Re: create a flame for few seconds
Reply With Quote #10

No have, server just stop when i throw a grenade

Last edited by faki; 05-21-2014 at 11:38.
faki 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 09:47.


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